Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Tomcat vs a setup.properties file

843842Apr 11 2008 — edited Apr 13 2008
Hi everyone!
I'm really desperate: my application works fine but not in Tomcat 6.0.
I have to use a setup.properties file and Tomcat doesn't find it even if I call it with a complete path (that is from the root):
Properties prop = new Properties();
prop.load(this.getClass().getClassLoader().getSystemResourceAsStream("C:/Documents and Settings/myr/workspace/suggestivetags/src/conf/setup.properties"));

so I get a nullpointerexception while trying to run the instruction 'prop.load' (I'm sure that the cause is that tomcat doesn't find the file, because I tried to insert a wrong path and I get the same error, then...).
I run my application in Tomcat after exporting it from Eclipse in a .war file...so Is there any angel to suggest me something? or maybe is there anyone suggesting how to run my application in tomcat without exporting it in a war file?(maybe the 'war' file is the problem...).

Help me, please......thanks in advance every reader for everything
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 11 2008
Added on Apr 11 2008
2 comments
151 views