tomcat-users mailing list archives

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

----- Original Message -----
From: "Craig R. McClanahan" <Craig.McClanahan@eng.sun.com>
To: <tomcat-user@jakarta.apache.org>
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
that
> > are new or newer when Tomcat starts. It would also be good if it removes
files
> > that are not in the archive. It is uncompressed in the first place because a
lot
> > of the JSP stuff requires classes to be generated (written to disk). There
may
> > be a bunch of other reasons it is expanded as well.
> >
>
> Consider it "cautious conservatism" in design.  The idea is to avoid getting a
bug
> report that Tomcat wiped out the changes a user made directly in the expanded
webapp
> directory.

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

>
> >
> > 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
file
> and deploy it.  Because Tomcat (currently) runs only out of an unpacked
directory,
> that is what Tomcat does.

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

> To update an existing application named "foo", all you need to do is the
following
> 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
concern?

jim


Mime
View raw message