tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Price <>
Subject Re: How do I get the absolute path of a file in a directory above WEB-INF directory of my web application?
Date Mon, 20 Jan 2003 15:24:01 GMT

Shapira, Yoav wrote:

> All other writing should be done to directories/files declared as
> parameters to your context or servlets.  For example:
> <context-param>
>   <param-name>logFile</param-name>
>   <param-value>/tmp/blahblahLogs/blahblahLogFile.txt</param-value>
> </context-param>
> This way other people using/deploying your app can configure these
> settings to a directory that suits their deployment.

I see -- so then, while this makes explicit the fact that there are 
files that need to be created by the person responsible for Deployment, 
since they can read web.xml but not the compiled servlet code, there is 
no guarantee that the directory will be available.  The Deployer still 
needs to do the legwork.  Would it be more reasonable to read/write to 
files in WEB-INF, since you can assure that the directories will exist 
by including them yourself with the webapp?

On second thought, I suppose not since the webapp might be in WAR format.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message