Posted By:
Steve_Higgins
Posted On:
Monday, September 29, 2003 08:50 AM
Hi All, I'm using Tomcat 3.3.1 in a Win2000 environment (for reasons I won't go into right now) and would like to know if I can change something that has been bugging me for a while. My application creates various work files as it runs and I'd like to be able to control where they are created. I have an entry in web.xml like this: xmlDirectory xml/ Temp xml directory which I read using getServletContext() . The application then creates its files in that directory. I originally used absolute pathnames for the param value but would prefer the directory to be relative to the context home directory of my application. Coded as it is above it creates file in TOMCAT_
More>>
Hi All,
I'm using Tomcat 3.3.1 in a Win2000 environment (for reasons I won't go into right now) and would like to know if I can change something that has been bugging me for a while.
My application creates various work files as it runs and I'd like to be able to control where they are created. I have an entry in web.xml like this:
xmlDirectory
xml/
Temp xml directory
which I read using
getServletContext()
. The application then creates its files in that directory. I originally used absolute pathnames for the param value but would prefer the directory to be relative to the context home directory of my application. Coded as it is above it creates file in TOMCAT_HOME/bin/xml which is worse than using absolute pathnames as far as I'm concerned.
Is there a way to retrieve the full pathname of the context home? Or does anyone have any suggestions?
Many thanks
Steve
<<Less