Elaine,
here is an example of how to read a property file located in the document
root directory :
Properties properties = new Properties();
try {
FileInputStream propFile = new
FileInputStream(getServletConfig().getServletContext().getRealPath("/topics.
properties");
properties.load(propFile);
}
catch (IOException ioe) {
// whatever you want
}
Pierre-Yves
-----Message d'origine-----
De : A mailing list for discussion about Sun Microsystem's Java Servlet API
Technology. [mailto:[EMAIL PROTECTED]]De la part de Elaine Burke
Envoy� : jeudi 12 juillet 2001 21:00
� : [EMAIL PROTECTED]
Objet : properties file in tomcat3.2.1
Can anyone help.......
I need to create a topics.properties file and save it in the filePath
directory to run my servlet successfully. Does anybody know where that would
be in tomcat-3.2.1?? I tried creating it within the localhost8080 folder
within the work folder but i'm still getting a FileNotFoundException. Any
suggestions appreciated!
Thanks
Elaine B.
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST". Archives:
http://archives.java.sun.com/archives/servlet-interest.html Resources:
http://java.sun.com/products/servlet/external-resources.html LISTSERV Help:
http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html