Howdy, The idea of a webapp is to be self-contained. What happens in typical installations, or at least the ones I've been part of, is that server administrators already have a particular place they like temporary and/or log files to go. Then they just modify the deployment descriptor (or the server.xml or equivalent file, depending on how the app is written) to suit their needs.
What I neglected to say in my previous email, as I take it for granted, is: 1. If your webapp requires ANY external resources (for reading, or writing, or both), the requirements should be well documented. What files (e.g. web.xml) should be edited and how must be well documented. 2. Reasonable defaults (e.g. System.getProperty("java.io.tmpdir")) must be used if no value is provided. Alternatively, a fatal exception can be thrown and processing stopped. Note that "." (the current working directory) is not a reasonable default. If a property is expected but not found, and a default value is used instead, this should be indicated in the log. It's been my experience that server administrators and IT departments are happier to receive an app as a war file rather than a set of individual files. Your mileage may vary, Yoav Shapira Millennium ChemInformatics >-----Original Message----- >From: Erik Price [mailto:[EMAIL PROTECTED]] >Sent: Monday, January 20, 2003 10:24 AM >To: Tomcat Users List >Subject: Re: How do I get the absolute path of a file in a directory above >WEB-INF directory of my web application? > > > >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. > > > >Erik > > >-- >To unsubscribe, e-mail: <mailto:tomcat-user- >[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:tomcat-user- >[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>