From: "Caldarale, Charles R" <chuck.caldar...@unisys.com>

>>Tomcat:  6.0
>>Tomcat Installation Directory: C:\Program Files\Apache Software
>>Foundation\Tomcat 6.0
>>OS:  Windows XP ( Windows 5.1 service pack 2 )
>>Java:  JDK  1.6.0_10-beta

snip..

>> 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.

Good advice Charles.

Unfortunately I don't have the option of altering the part of the code
where the context(web application) reads in the file it needs.

I could reset CATALINA_BASE to point to somewhere else, but I have multipe
contexts(web applications ) and I need each to have its own unique
directory to go look for files in.

Right now I am only running instance of Tomcat ( for development purposes
) with my set up and if possible I would like to keep it that way.

Is it possible that I could make each context get a different
CATALINA_BASE (or other) variable or otherwise get accomplish the same
goal?

Thanks in advance for any help.

I'm still new to navigating around the docs and the new tomcat

Steve

Reply via email to