tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Hencin" <>
Subject RE: preserving files/folders when updating an app
Date Mon, 06 Nov 2006 21:10:20 GMT
As for my updates, I was hoping to keep it simple, i.e. just the war file,
and not a script as well. I don’t currently have an install script, or
update script. We just create a new WAR file, and supply that to the end
users. They then drop this war into webapps, and it "normally" replaces the
old deployment.

Well I think so, in the case of the css file, they need to be referenced
within the context of the web server, so being inside TC webapps dir might
do, as far as linking to the css file. 

As for my "Attached files" I have come up with a solution using Apache web
server 2.2.3 that I think is good. 

Within our database for the webapp we specify a "documentFileLocation" this
is the local place that the web app would copy any "Attachments" to. This
can be outside TC. 
They also specify a "documentFilePath" this is the virtual directory as
created in Apache web server. 

We then create the link in our app to be documentFilePath + "nameoffile"
These links are displayed on a form that corresponds to a unique requestID
in our database. Users create request, like a change request and can attaché
documents to that request. 

This way, I don’t have to worry about updates of our war file, and I can use
Apache to serve up these files. Incidental the files are saved in folders we
create, and then copy the file into the documentFileLocation + "folderIDXX"
+ file

This helped me serve the attachments with a HTTP schema , I was using UNC
before but that only worked for users accessing the webapp from inside the
clients network. Anyone outside would see a UNC hyperlink, and not be able
to access the file.

As for my style sheets, until I come up with a better way to preserve them,
I wont encourage users to modify them.


-----Original Message-----
From: Christopher Schultz [] 
Sent: Monday, November 06, 2006 12:53 PM
To: Tomcat Users List
Subject: Re: preserving files/folders when updating an app

Hash: SHA1


> Yeah I thought about that. And it certainly an option. I can create a
> file that does the same. 
> I just was curious if you could specify in your war file options for no
> overwrite folder "X" or something.

Do you have the option of keeping these "protected" files outside of the
WAR target? That would be my recommendation. That way, if the person
doing the deployment forgets the "upgrade script", you won't end up
deleting potentially thousands of useful documents.

Don't forget to back up early and often ;)

- -chris

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


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

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

View raw message