This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I deployed the war file and the application performed wonderfully fine. The problem is, one functionality in my application uses a property file (abc.properties) which is stored under a created folder "conf". This property file is embedded in the default.war. But, my java code which loads the properties file (using the Java Properties class), gives "FileNotFoundException". My question is, is it required to include my application specific properties file in the web.xml file? If so, how do i do it? why is my Java code not able to read my properties file (abc.properties)?
I tried it and it did not work. Could you direct me to the right path. This is the only feature missing in my application. I can't seem to load that property file, but it works fine if I put it in the src folder. Any help would be grateful.
Originally posted by Nathaniel Stoddard: You need to use the functions provided by java.lang.ClassLoader to do this sort of thing. Time to go read those API docs.
Joined: May 29, 2003
Um ... the functions I'm talking about in java.lang.ClassLoader don't throw FileNotFoundExceptions. So, are you really using the right ones? Why don't you tell us the pathname of the property file that's in your WAR, and the code snippet you're using to open it.
Originally posted by Nathaniel Stoddard: Um ... the functions I'm talking about in java.lang.ClassLoader don't throw FileNotFoundExceptions. So, are you really using the right ones? Why don't you tell us the pathname of the property file that's in your WAR, and the code snippet you're using to open it.
Hey, if i am not wrong. You name your file as .txt and opening stream to .properties file. That error might persist, move your file to the same directory where your class is located. [ April 16, 2005: Message edited by: Adeel Ansari ]