On Fri, 11 May 2001, Pierre-Yves Saumont wrote:
| String path =
| getServletConfig().getServletContext().getRealPath("/WEB-INF/");
|
| will give you the real path to your WEB-INF directory. You might have to add
| a trailing slash, depending on your servlet container.
What about a WAR file?
The deal is that as I've so far understood, if you want a file, you'll
have to use something like
InputStream is = this.getClassLoader().getResourceAsStream(name);
to be sure that you can port your stuff.
[ original message from me: ]
| Can I access (config) files which resides in the WEB-INF directory?
|
| I have some config files for a "server" I've made in Servlets, and I
| basically wonder what the spec says about files in WEB-INF (not lib or
| classes). I now have them residing in "classes", but I find this a bit
| ugly. It would be cooler if I could put them along with the web.xml.
|
| Any advice or explaination will be appreciated!
--
Mvh,
Endre
___________________________________________________________________________
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