tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Cook" <>
Subject Re: Updating Web Applications in Tomcat
Date Mon, 11 Sep 2000 19:40:51 GMT

----- Original Message -----
From: "Craig R. McClanahan" <>
To: <>
Sent: Monday, September 11, 2000 1:53 PM
Subject: Re: Updating Web Applications in Tomcat

> James Cook wrote:
> > Troy,
> >
> > Not being a committer, I would venture a guess that this is an oversight. I
> > suppose it would be most proper if the war expander class unzips any files
> > are new or newer when Tomcat starts. It would also be good if it removes
> > that are not in the archive. It is uncompressed in the first place because a
> > of the JSP stuff requires classes to be generated (written to disk). There
> > be a bunch of other reasons it is expanded as well.
> >
> Consider it "cautious conservatism" in design.  The idea is to avoid getting a
> report that Tomcat wiped out the changes a user made directly in the expanded
> directory.

I can understand this, but only expanding files that are newer should remedy

> >
> > Thinking about it (and not knowing the history), I'm not sure why they
expand a
> > war. Any files that need to be written, can still be written to the current
> > locations.
> >
> The auto-expansion is there in the first place to satisfy the servlet spec
> requirement that all servlet containers must accept a web application archive
> and deploy it.  Because Tomcat (currently) runs only out of an unpacked
> that is what Tomcat does.

I didn't read anything in the 2.3 draft that indicates that the WAR must be

> To update an existing application named "foo", all you need to do is the
> three steps:
> * copy "foo.war" to $TOMCAT_HOME/webapps
> * delete the old "foo" directory
> * restart Tomcat
> and the new JAR will be expanded with updated contents.

I can imagine that the next revs of Java IDEs that support WAR file creation
will allow users to compile there classes directly into WAR files. (I can dream
can't I?) Is the spec vague on WAR expansion, or did I overlook an obvious


View raw message