> From: Steve Mysterious [mailto:tinker...@gmail.com]
> Subject: Tomcat 6: How to tell a Context/Webapp where to look
> for files?
>
> I noticed that if I don't give my JSPs and my servlet a
> path that they look for files in CATALINA_HOME

You should probably be using ServletContext.getResourceAsStream(), or possibly 
ClassLoader.getResourceAsStream().  Note that using 
ServletContext.getRealPath() can be problematic, since the container (Tomcat) 
is under no obligation to expose the file system (if any) to servlets.

 - 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

Reply via email to