> From: David.Meldrum [mailto:david.meld...@verizon.net] > Subject: Re: Path problem > > For example, how do I get a reference to the > "/webapps/MyWebApp/WEB-INF/foo.properties" file?
Gregor already told you here: http://marc.info/?l=tomcat-user&m=123697177925016&w=2 > ServletContext.getRessourceAsStream("/webapps/MyWebApp/WEB-INF > /foo.properties");? No, leave out the /webapps. > The javadoc says the argument is a path Read the doc more carefully; it actually says: "The path must begin with a '/' and is interpreted as relative to the current context root." > but I don't know the full path, You don't need to; the path is relative to your webapp (despite the leading slash). > Also how do I create a file under "/logs"? Usually, you use a logger. Tomcat provides a built-in logging mechanism based on java.util.logging, or you can implement one based on any of several standard libraries, such as log4j. The logger configuration specifies where to write the output. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org