----- Original Message ----- From: "Paolo Niccolò Giubelli" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Friday, July 04, 2008 4:25 PM
Subject: Make uploaded files survive to re-deploy


Hi! I'm very enthusiastic about tomcat, but I have a problem. I deployed several web applications into an apache tomcat 5.5 webserver instance, and most of them get images from the clients via file upload. Sometimes I need to change something or correct bugs, and obviously I need to redeploy the applications. How can I make uploaded files survive to this task, without using backup copies and/or using the database to store them(a lot of people told me that this could kill sql performances)? If I use an external directory, it would be difficult to make those files accessible to the webpages...
Any help appreciated.
Thank you in advance!

Paolo

This is what we do, theres probably many ways...
We us the Apache web server as well, and we dump image files to that.... we do use a dB but only to store file locations (URIs), not files. It will kill most dB's if you store huge blobs.... then how it works is that the JSP pages or servlets simply use the link to the Apache server image in the page.
So JSP goes to browser... browser sucks image from Apache... TC is free ;)
Why we did it like this but it never got big enuf to test it fully... is that if the images got huge, the idea is we can dump images to other SP's on cheap static sites, and TC still controls them.... I thought it was neat anyway ;)

I've seen other guys do deployment tricks like deploy unpacked wars to TC, but in general they are not worth the pain. Then in a similar idea to our Apache idea.... some guys use a dedicated web-app to store images, and linux guys just laugh at us MS guys and use symlinks.

Why Apache is nice... is because TC can run behind it... so its all port 80.
Anyway if you jjust realize that a browser comes back for images and IFrames and script files.... etc... you'll see it doesnt really matter what server they on.

Have Fun...

---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to