tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Burgess <J...@riskdecisions.com>
Subject RE: How to write files when web-app is a WAR?
Date Mon, 10 Jun 2002 10:24:41 GMT
If the war file is unpacked (which tomcat will do automatically at startup
unless you specify somewhere in server.xml not to) then it is just as if you
had deployed to the webapp\your_app directory yourself.  I believe that
leaving war's unpacked results in slightly worse performance and isn't
recommended for a deployment server anyway.

Best Wishes
John Burgess
john@riskdecisions.com
Tel: 01865 718666 
Fax: 01865 718600


-----Original Message-----
From: Chris Bailey [mailto:chris@codeintensity.com]
Sent: Friday, June 07, 2002 8:02 PM
To: Tomcat Mailing List
Subject: How to write files when web-app is a WAR?


>From what I've read, it seems that if you package your web application in a
WAR file, you have no way of attaining a path on the server's file system
that you can use to write files.  Reference:
http://mikal.org/interests/java/tomcat/archive/view?mesg=15006.

I have a web app that we'd like to package as a WAR.  But, we need to be
able to write various data files out to the server's file system.  What
solution(s) are people using for this?  Writing the files to a database is
not acceptable for us  (I'm not a DBMS expert, but have been told that BLOB
performance is not great, and that using a DB as a file system replacement
is not good, etc.).

I was thinking we'd have to do a bit of a hack...  Basically, at the time we
"install" our application, the user will pick the real path on their disk
where the data files are stored.  We then store this in a property in
web.xml, and retrieve that in the app for using as the path.  For
links/hrefs on a web page, we'd just use something like /data_files, but
then set up a path-mapping that had /data_files mapped to say
/home/appname/data_files or whatever.   I also am assuming I will need to
ensure that this real path lies outside of the WAR expanded directory
because someday Tomcat (and maybe others already?) will not expand the WAR
file.

Anyway, what have folks come up with?  While we use Tomcat for all our
development work, we'll likely have to support a variety of Servlet
containers (I think we can require at least Servlet 2.2, hopefully 2.3).

____
Chris Bailey       mailto:chris@codeintensity.com
Code Intensity       http://www.codeintensity.com


--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.365 / Virus Database: 202 - Release Date: 24/05/02
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.365 / Virus Database: 202 - Release Date: 24/05/02
 

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message