anonymous wrote :
prop.load(Thread.currentThread().getContextClassLoader().getResourceAsStream(PROP_FILE_NAME));
I usually do it this way, whenever i am loading a properties file:
prop.load(this.getClass().getClassLoader().getResourceAsStream(PROP_FILE_NAME));
Assuming that the PROP_FILE_NAME is just the name of the file and not the path, then that
file should be present directly inside the war/ear/jar. If the PROP_FILE_NAME is something
like "/conf/myprops/someprop.properties" then this is how the directory
structure will look like:
| myApp.war
| |
| |------------ META-INF
| |
| |
| |------------- conf
| | |------ myprops
| | |------------ someprop.properties
| |
| |------------- WEB-INF
| | |--------- classes
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987226#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...