On Wed, Sep 29, 2004 at 06:27:13PM +0100, Chris Ward wrote: : Only having to "release" one file is great, but I've hit a problem : of my own making. My webapp writes various XML files to datestamped : dir within the webapp <context>. When I deploy the WAR file I purge : all these generated files. : [snip] : Should I use a different <context> to hold my data?
That's one option; but another (likely more scalable) idea would be to put files in a filesystem, where they belong. The idea is to setup a directory outside of the Tomcat context path -- specify it in a properties file, or in a context param, whatever -- and write the data there. As the system grows to support multiple Tomcat instances spread across different machines, you could share the filesystem via NFS (not pretty, but it works), stuff the docs in a database (not pretty, but it works), or have the mid-tier Tomcat instances push the data to another, internal Tomcat setup that writes the files to a clustered/RAID'd fs. .... etc, etc, depending on how valuable these docs are and how much this app grows. By not writing to your context, you can wrap everything up in a WAR file and, better still, gain (a little) more security by making the WAR file owned and served by two different user accounts. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
