tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Using Tomcat API to save single files into a wep app - No redeploy
Date Mon, 01 Oct 2007 13:39:13 GMT
Hash: SHA1


Iannetti, Gabriele wrote:
> I would like to save single files (I got via HTML post) to an 
> existing web app on the application server (JBoss) without 
> redeploying the [whole] WAR file.

Ouch. Really?

That shouldn't be too hard: just write a new WAR to a temporary location
containing all the old files plus the new one, then copy the new WAR
file over the old one. The servlet context will re-load, so you may want
to think about whether you want to do that or not.

I wouldn't recommend this course of action.

> (I really need to save the files into such a WAR archive file on the 
> server; to keep it short: I dont want to save the files on an 
> absolute local path on hard disk or a database because of an other 
> API I am using which accesses the files via URI web app directory)

Why not just change the URL to something that points to another
location, rather than pointing into the WAR file (or, rather, the webapp

> I am using Tomcat 5, so far I only found the Java docs for the Tomcat
>  API 6, but the API for the Tomcat 5 is not available on the Apache 
> Tomcat website.

Sure it is: then
click on "Tomcat Javadocs". It will take you here:

You won't use the Tomcat API for any of this: it's straight Java API
stuff (except for maybe figuring out where your WAR file really is in
order to replace it).

- -chris
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla -


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message