Pratt,

Sorry to take so long in responding to you; I've been on a business trip out-of-country for the past ten days.

I've not found any Tomcat documentation specifically addressing this issue but I've not looked all that hard either.  However, I did a search on a newsgroup archive and came up with a potential solution.  See the following snippets from the two messages I've included below.  I also think that Jayson's suggestion is on the right track during the development phase as an alternative.

My schedule prevents me from doing any development work for the next couple of weeks.  I'd appreciate hearing back from you if you have time whether or not this potential solution works.

Thanks again.

John Fleischauer

=========================================================================

If you set the reloadable attribute on "true" Tomcat automatically
 reloads classes without restarting Tomcat. As in the example:

 <Context path="/extest"
          docBase="G:\EclipseWrkspce\extest"
     workDir="G:\EclipseWrkspce\extest\work\org\apache\jsp"
             debug="0"
          reloadable="true"/>

==========================================================================

Each Web application must have its own ServletContext.
 The ServletContext acts as a link between your application
 and the Tomcat engine. You create a ServletContext by adding
 a line in the conf/server.xml file. It looks like this:

 <Context path="/foo" docBase="foo" debug="0" reloadable="true" />

 The path attribute tells Tomcat that all request URLs ending
 in /foo belong to the foo application. The docBase attribute
 tells Tomcat that the foo application resides in a subdirectory
 of the webapps folder called foo.

 You can now copy all the JSP, HTML, and image files associated
 with your application. You place JSP and HTML files in
 the application directory. Next, create a web.xml file in the
 WEB-INF folder (you can copy and modify one of the existing
 web.xml files to get started). Copy your Servlets to the
 /foo/WEB-INF/classes directory and add an entry to the web.xml
 file for each Servlet associated with the application. The
 Servlet entry provides Tomcat with information about the
 Servlet, its class file, and any parameters that may need to
 be passed to the Servlet. If your application consists only of
 JSP pages, then you don't need to worry about modifying the
 web.xml file.

=========================================================================

>From: "Tomcat-RND" <[EMAIL PROTECTED]>

>Reply-To: "jdjlist" <[EMAIL PROTECTED]>
>To: "jdjlist" <[EMAIL PROTECTED]>
>Subject: [jdjlist] RE: Tomcat WAR Expansion
>Date: Mon, 3 Mar 2003 11:36:27 +0530
>
>
>Thanks Jhon,
>Your understanding of my problem is exact. But Is it documented anywhere
>from Tomcat documentaion?
>Can you please help me if such resource is available in your notice??
>
>Thanks and Regards
>Prathap.s
>
>
>----- Original Message -----
>From: "Jayson Falkner" <[EMAIL PROTECTED]>
>To: "jdjlist" <[EMAIL PROTECTED]>
>Sent: Monday, March 03, 2003 12:22 AM
>Subject: [jdjlist] RE: Tomcat WAR Expansion
>
>
> > A fine solution is to have Tomcat deploy the web app directly from the
> > WAR (i.e. don't unpack it at all). You will have to manually add either
> > an entry to server.xml or create your own deployment XML file in the
> > webapps directory, but you get the bonus of always having the current
> > WAR deployed.
> >
> > Cheers,
> > Jayson Falkner
> > [EMAIL PROTECTED]
> >
> > On Sat, 2003-03-01 at 13:19, John Fleischauer wrote:
> > >
> > >
> > > Tomcat detects that a new .war files was added to the webapps
> > > directory and will unpack the new application file and add the context
> > > entry into the server.xml file when Tomcat is started. Tomcat will
> > > bypass the unpacking process on subsequent startups since the
> > > application already is registered in the server.xml file.
> > >
> > >
> > > I believe what Pratt is asking in his inquiry concerns updates to the
> > > original application. It seems to me that Tomcat should recognize
> > > that a revised .war file has replaced the original and rebuild
> > > (unpack) the application on startup. I also have to remove the
> > > context entry to force Tomcat to re-build the revised application.
> > > This becomes a pain during development.
> > >
> > >
> > > Are Pratt and I missing something or is this the normal behavior of
> > > Tomcat? I'm currently using Tomcat 4.1.18.
> > >
> > >
> > > TAI.
> > >
> > >
> > > John.
> > >
> > >
> > >
> > >
> > > >From: Kevin Mukhar
> > > >Reply-To: "jdjlist"
> > > >To: "jdjlist"
> > > >Subject: [jdjlist] RE: Tomcat WAR Expansion
> > > >Date: Sat, 01 Mar 2003 09:41:28 -0700
> > > >
> > > >Yes, that is standard behavior. It's one way to deploy a web
> > > >application. You get a WAR from some source, put it into the webapps
> > > >directory, and when the server starts up, it unpacks the web
> > > >application and deploys it.
> > > >
> > > >Greg Nudelman wrote:
> > > >
> > > >>I don't know the details, and I've never seen it do that before,
> > > >>but it seems strange that it would try to expand the WAR. Maybe
> > > >>somewhere in some config file is the entry
> > > >> "developer_environment=true"
> > > >> or something like that... I can't see why it should try and
> > > >>expand it by default. Any Tomcat gurus out there?
> > > >> Greg
> > > >>
> > > >> -----Original Message-----
> > > >> From: Prathap [mailto:[EMAIL PROTECTED]
> > > >> Sent: Friday, February 28, 2003 8:26 AM
> > > >> To: jdjlist
> > > >> Subject: [jdjlist] Tomcat WAR Expansion
> > > >>
> > > >> Hi,
> > > >>
> > > >> When i place a WAR file into the Tomcat webapps folder, on
> > > >> Restart tomcat
> > > >> is not expanding the WAR if server.xml contains the Context
> > > >>entry
> > > >> related to
> > > >> this, If i remove the Context entry it is expanding.
> > > >>
> > > >> Is there any configuration required to expand the WAR by
> > > >>keeping the
> > > >> Context entry in the server.xml?
> > > >>
> > > >> I am using Tomcat 4.1.18 version.
> > > >>
> > > >> Thanks and Regards,
> > > >> Pratt
> > > >> ---
........


Help STOP SPAM with the new MSN 8 and get 2 months FREE* ---
You are currently subscribed to jdjlist as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
http://www.sys-con.com/fusetalk

Reply via email to