on 08-13-2004 4:19 PM
Hello,
How can I use a .properties-file within a servlet context, where do I have to store it ?
I am working with SAP Web AS 6.40, 90-days-trial-version.
Thank you very much in advance.
Bye.
Nadine
You better don't.
For this purpose there are descriptors in web.xml. If you try to use property files and install this on a propduction site of WebAS you soon will have trouble:
Wrtiing to this file means your servlet only will write to the local file. Your next login may transport you to a different server, where this properties file may look completely different...
If you want to write properties, you should write to a table in the DB.
Regards,
Benny
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nadine,
this is normally done via a Resource Reference to a java.sql.DataSource. Please have at look at the corresponding <a href="http://help.sap.com/saphelp_nw04/helpdata/en/15/6d56f65fb59e4db97253c89c5cfefd/frameset.htm">chapter</a> in the NW '04 documentation.
The properties of the DataSource can be edited using the Visual Admin at "Server Node->Services->JDBC Connector"
Hope that helps.
Kind regards
Stefan
Hi Nadine,
You are thanking a poster for his answer.
Please next time also give him points.
See: /people/mark.finnern/blog/2004/08/10/spread-the-love
This time I did it for you.
Remember: When you ask a question you also assume the responsibility to assign points.
Please check your other questions and if the answers were good.
Spread the love and give some points.
Thanks in advance, Mark.
Hi,
I have a similar situation where I need to place some info in a .properties file in an EJB jar. Where should this file be placed (context?) and how can I access it?
The file is read only, it is there to provide flexibility to the application.
Thanks in advance,
Manik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.