Hi,
My servlet is unable to read my properties file. 
1. I am running Apache Tomcat/4.0.1.
2. I have added the following lines on server.xml file

       <!-- add context for my test servlet -->
       <Context path=""
                 docBase="D:/TestServlet"
                 crossContext="false"
                 debug="0"
                 reloadable="false" >
        </Context>

3. My class files and the .properties files are under
    d:/TestServlet/WEB-INF/classes

4. Other jsp files are under
    d:/TestServlet

My application was working fine..but now I want to externalize some
variables and read them through the properties file. Also I don't want it to
be shared between different servlets .It doesn't seem to work.

============================
Code snippet which reads the file..
...
...
    private static ResourceBundle bundle;
    
    static {

            bundle = ResourceBundle.getBundle("preference");        
        }

//preference.properites is under d:/TestServlet/WEB-INF/classes direcory
....
============================
Thanks for your help
Rajesh
############################################################################
########################## This email communication may contain CONFIDENTIAL
INFORMATION and is intended only for the use of the intended recipients
identified above.  If you are not the intended recipient of this
communication, you must not use, disclose, distribute, copy or print this
email. If you have received this communication in error, please immediately
notify the sender by reply email, delete the communication and destroy all
copies.
############################################################################
##########################

Reply via email to