A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Servlets
Author
reading a properties file from the war file
mat buckland
Greenhorn
Joined: Sep 01, 2009
Posts: 24
posted
Oct 21, 2009 06:35:51
0
I have a properties file located in the root of the war file.
How do I read in that properties file when the servet is deployed?
thanks
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35253
7
posted
Oct 21, 2009 06:42:45
0
That's what ServletContext.getResourceAsStream is for.
You may want to move the file from the web app root into the WEB-INF directory, though, lest it becomes publicly accessible.
Android apps
–
ImageJ plugins
–
Java web charts
I agree. Here's the link:
http://aspose.com/file-tools
subject: reading a properties file from the war file
Similar Threads
Access deployed archive contents
best place to put configuration properties.
Internatonalization in Liferay
Don't see properties files after deployment from Jdeveloper 11g
cannot load property file from WAR
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter