You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jacob Kjome <ho...@visi.com> on 2002/06/25 01:30:02 UTC

question about hot deployment and manager app....

Hi,

I've been using the ant tasks for the manager app and they are really
slick.  Makes testing much easier.

However, how does one dynamically install an application when one has
to specify context stuff in the server.xml or in a standalone
[myapp].xml (using Tomcat 4.1.3)?

I'd like to run my builds from anywhere and not have Tomcat attempt to
load the app up at startup.  I need to specify the context in the
[myapp].xml because I have Reource and ResourceParams for JDBC
connection pooling.

Is this impossible or am I just missing something?
  

-- 
Best regards,
 Jacob                          mailto:hoju@visi.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Craig, how do I .......

Posted by Brett Porter <bp...@f2network.com.au>.
Craig already wrote this:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/index.html

And can I recommend this:
http://www.tuxedo.org/~esr/faqs/smart-questions.html

STEVE R BURRUS wrote:
> Craig, how do I go about starting to work with Java Servlets and Java Server Pages
> in Tomcat's Web Container context?! You seem to be pretty damn knowledgeable about
> all aspects of Tomcat--just going by the answers which I have seen you supply to
> various users questions--so I REALLY THOUGHT that you could answer my query too.  
> 
> **********************************************************************************
> 
> --- "Craig R. McClanahan" <cr...@apache.org> wrote:
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Craig, how do I .......

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 24 Jun 2002, STEVE R BURRUS wrote:

> Date: Mon, 24 Jun 2002 19:46:06 -0700 (PDT)
> From: STEVE R BURRUS <st...@yahoo.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Craig, how do I .......
>
> Craig, how do I go about starting to work with Java Servlets and Java
> Server Pages in Tomcat's Web Container context?! You seem to be pretty
> damn knowledgeable about all aspects of Tomcat

Well, I originally wrote the large majority of the servlet container in
Tomcat 4.x :-)

>--just going by the
> answers which I have seen you supply to various users questions--so I
> REALLY THOUGHT that you could answer my query too.
>

What I would do is find a good tutorial on the basic concepts.  This may
sound like a blatant commercial (since I work for Sun), but I highly
recommend that you consider downloading the Java Web Services Developer
Pack (which includes Tomcat)  and the corresponding tutorial (totalling
about 600 pages), from <http://java.sun.com/webservices>.  This package
has a very nice installer to set things up for you, and the tutorial
covers a very wide range of web related technologies, including coverage
over the very issue discussed in this mail thread (Ant tasks for dynamic
application deployment).  If you prefer GUI based tools for application
deployment, it even includes a customized version of "deploytool" from the
J2EE reference implementation as well.

Craig


> **********************************************************************************
>
> --- "Craig R. McClanahan" <cr...@apache.org> wrote:
> >
> >
> > On Mon, 24 Jun 2002, Jacob Kjome wrote:
> >
> > > Date: Mon, 24 Jun 2002 18:30:02 -0500
> > > From: Jacob Kjome <ho...@visi.com>
> > > Reply-To: Tomcat Users List <to...@jakarta.apache.org>,
> > >      Jacob Kjome <ho...@visi.com>
> > > To: Tomcat Users List <to...@jakarta.apache.org>
> > > Subject: question about hot deployment and manager app....
> > >
> > >
> > > Hi,
> > >
> > > I've been using the ant tasks for the manager app and they are really
> > > slick.  Makes testing much easier.
> > >
> > > However, how does one dynamically install an application when one has
> > > to specify context stuff in the server.xml or in a standalone
> > > [myapp].xml (using Tomcat 4.1.3)?
> > >
> >
> > I do this by using the "install" task that installs a "context
> > configuration file".  What's that, you might ask?  It's simply an XML file
> > that contains the <Context> element for your webapp, including all of its
> > nested tags for the custom configuration you need.  Something like this:
> >
> >   <target name="install" depends="main"
> >     <install url="${url}" username="${username}" password="${password}"
> >      path="/myapp" war="file://${build.home}/myapp.xml"/>
> >
> > In later versions (starting with 4.1.5 I think) you can also use this kind
> > of thing with the deploy command -- simply put a "META-INF/context.xml"
> > file in your WAR file that is uploaded.
> >
> > > I'd like to run my builds from anywhere and not have Tomcat attempt to
> > > load the app up at startup.  I need to specify the context in the
> > > [myapp].xml because I have Reource and ResourceParams for JDBC
> > > connection pooling.
> > >
> > > Is this impossible or am I just missing something?
> > >
> >
> > Yep ... it is definitely possible, and very handy.
> >
> > >
> > > --
> > > Best regards,
> > >  Jacob                          mailto:hoju@visi.com
> > >
> >
> > Craig
> >
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Craig, how do I .......

Posted by STEVE R BURRUS <st...@yahoo.com>.
Craig, how do I go about starting to work with Java Servlets and Java Server Pages
in Tomcat's Web Container context?! You seem to be pretty damn knowledgeable about
all aspects of Tomcat--just going by the answers which I have seen you supply to
various users questions--so I REALLY THOUGHT that you could answer my query too.  

**********************************************************************************

--- "Craig R. McClanahan" <cr...@apache.org> wrote:
> 
> 
> On Mon, 24 Jun 2002, Jacob Kjome wrote:
> 
> > Date: Mon, 24 Jun 2002 18:30:02 -0500
> > From: Jacob Kjome <ho...@visi.com>
> > Reply-To: Tomcat Users List <to...@jakarta.apache.org>,
> >      Jacob Kjome <ho...@visi.com>
> > To: Tomcat Users List <to...@jakarta.apache.org>
> > Subject: question about hot deployment and manager app....
> >
> >
> > Hi,
> >
> > I've been using the ant tasks for the manager app and they are really
> > slick.  Makes testing much easier.
> >
> > However, how does one dynamically install an application when one has
> > to specify context stuff in the server.xml or in a standalone
> > [myapp].xml (using Tomcat 4.1.3)?
> >
> 
> I do this by using the "install" task that installs a "context
> configuration file".  What's that, you might ask?  It's simply an XML file
> that contains the <Context> element for your webapp, including all of its
> nested tags for the custom configuration you need.  Something like this:
> 
>   <target name="install" depends="main"
>     <install url="${url}" username="${username}" password="${password}"
>      path="/myapp" war="file://${build.home}/myapp.xml"/>
> 
> In later versions (starting with 4.1.5 I think) you can also use this kind
> of thing with the deploy command -- simply put a "META-INF/context.xml"
> file in your WAR file that is uploaded.
> 
> > I'd like to run my builds from anywhere and not have Tomcat attempt to
> > load the app up at startup.  I need to specify the context in the
> > [myapp].xml because I have Reource and ResourceParams for JDBC
> > connection pooling.
> >
> > Is this impossible or am I just missing something?
> >
> 
> Yep ... it is definitely possible, and very handy.
> 
> >
> > --
> > Best regards,
> >  Jacob                          mailto:hoju@visi.com
> >
> 
> Craig
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: question about hot deployment and manager app....

Posted by Milt Epstein <me...@uiuc.edu>.
On Tue, 25 Jun 2002, Jacob Kjome wrote:

> Milt,
>
> You can set up a static mod_jk.conf file for Apache to load that
> includes references to contexts that you may not have installed yet,
> but you plan on installing.  Then, once it is actually installed in
> Tomcat, the redirector will get the request to Tomcat just fine.
> Just plan a bit in advance.  Also, it usually doesn't take long to
> restart Apache, do adding stuff to the mod_jk.conf and restarting
> shouldn't be too much of a big deal.

Thanks for the reply.

This file would have to be Include'd in Apache's main httpd.conf file,
correct?  We've considered this solution, but it is not ideal.  For
example, there might be several Tomcat instances, so there'd be
several such mod_jk.conf files.  And they'd probably be Include'd in
the same section(s) of httpd.conf.  Thus there is increased chances of
errors or interference between the different mod_jk.conf files.

FWIW, I sent out a separate message with a more detailed description
of what we're trying to do and what we're considering.


> At 10:21 PM 6/24/2002 -0500, you wrote:
> >On Mon, 24 Jun 2002, Craig R. McClanahan wrote:
> >
> > > On Mon, 24 Jun 2002, Milt Epstein wrote:
> >[ ... ]
> > >
> >
> >Thanks for the info.
> >
> >
> > > > Also, is this something that only applies to Tomcat standalone, or
> > > > will it work when Tomcat is integrated with Apache?  If so, how
> > > > does it take care of the neccesary Apache httpd directives (either
> > > > JkMount or WebAppDeploy or whatever) to make sure Apache forwards
> > > > the appropriate requests to Tomcat.
> > >
> > > These tasks are targeted at Tomcat standalone.  They don't do
> > > anything about restarting your web server for you (and, AFAIK, you
> > > don't have any choice -- Apache, at least, does not have any notion
> > > of dynamic deployment without restarting, although the restart
> > > process can be pretty quick).
> >
> >But it's more than just a matter of restarting Apache, right?  Even
> >with a restart, Apache has to know about the new URL's/contexts.  And
> >can that be done without modifying Apache's httpd.conf file?
> >
> >(I'm asking because we may be setting up an environment with separate
> >"service" managers and "system" managers, with the service managers
> >having access to all the Tomcat stuff, but not the Apache stuff --
> >although they probably will be able to stop/start Apache.)
> >
> >Thanks.

Milt Epstein
Research Programmer
Systems and Technology Services (STS)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
mepstein@uiuc.edu


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: question about hot deployment and manager app....

Posted by Jacob Kjome <ho...@visi.com>.
Milt,

You can set up a static mod_jk.conf file for Apache to load that includes 
references to contexts that you may not have installed yet, but you plan on 
installing.  Then, once it is actually installed in Tomcat, the redirector 
will get the request to Tomcat just fine.  Just plan a bit in 
advance.  Also, it usually doesn't take long to restart Apache, do adding 
stuff to the mod_jk.conf and restarting shouldn't be too much of a big deal.

Jake

At 10:21 PM 6/24/2002 -0500, you wrote:
>On Mon, 24 Jun 2002, Craig R. McClanahan wrote:
>
> > On Mon, 24 Jun 2002, Milt Epstein wrote:
>[ ... ]
> >
>
>Thanks for the info.
>
>
> > > Also, is this something that only applies to Tomcat standalone, or
> > > will it work when Tomcat is integrated with Apache?  If so, how
> > > does it take care of the neccesary Apache httpd directives (either
> > > JkMount or WebAppDeploy or whatever) to make sure Apache forwards
> > > the appropriate requests to Tomcat.
> >
> > These tasks are targeted at Tomcat standalone.  They don't do
> > anything about restarting your web server for you (and, AFAIK, you
> > don't have any choice -- Apache, at least, does not have any notion
> > of dynamic deployment without restarting, although the restart
> > process can be pretty quick).
>
>But it's more than just a matter of restarting Apache, right?  Even
>with a restart, Apache has to know about the new URL's/contexts.  And
>can that be done without modifying Apache's httpd.conf file?
>
>(I'm asking because we may be setting up an environment with separate
>"service" managers and "system" managers, with the service managers
>having access to all the Tomcat stuff, but not the Apache stuff --
>although they probably will be able to stop/start Apache.)
>
>Thanks.
>
>Milt Epstein
>Research Programmer
>Systems and Technology Services (STS)
>Campus Information Technologies and Educational Services (CITES)
>University of Illinois at Urbana-Champaign (UIUC)
>mepstein@uiuc.edu
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>

Re: question about hot deployment and manager app....

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 24 Jun 2002, Milt Epstein wrote:

> Date: Mon, 24 Jun 2002 22:21:28 -0500 (CDT)
> From: Milt Epstein <me...@uiuc.edu>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Re: question about hot deployment and manager app....
>
> On Mon, 24 Jun 2002, Craig R. McClanahan wrote:
>
> > On Mon, 24 Jun 2002, Milt Epstein wrote:
> [ ... ]
> >
>
> Thanks for the info.
>
>
> > > Also, is this something that only applies to Tomcat standalone, or
> > > will it work when Tomcat is integrated with Apache?  If so, how
> > > does it take care of the neccesary Apache httpd directives (either
> > > JkMount or WebAppDeploy or whatever) to make sure Apache forwards
> > > the appropriate requests to Tomcat.
> >
> > These tasks are targeted at Tomcat standalone.  They don't do
> > anything about restarting your web server for you (and, AFAIK, you
> > don't have any choice -- Apache, at least, does not have any notion
> > of dynamic deployment without restarting, although the restart
> > process can be pretty quick).
>
> But it's more than just a matter of restarting Apache, right?  Even
> with a restart, Apache has to know about the new URL's/contexts.  And
> can that be done without modifying Apache's httpd.conf file?
>

I don't have any clue how to make that stuff work (I only use Tomcat
standalone), but I imagine that if the web connector were able to generate
a complete "include" file for httpd.conf that you could get away without
manual modifications.  But I don't use that stuff at all, so don't quote
me.

> (I'm asking because we may be setting up an environment with separate
> "service" managers and "system" managers, with the service managers
> having access to all the Tomcat stuff, but not the Apache stuff --
> although they probably will be able to stop/start Apache.)
>
> Thanks.
>
> Milt Epstein
> Research Programmer
> Systems and Technology Services (STS)
> Campus Information Technologies and Educational Services (CITES)
> University of Illinois at Urbana-Champaign (UIUC)
> mepstein@uiuc.edu
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
Craig



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: question about hot deployment and manager app....

Posted by Milt Epstein <me...@uiuc.edu>.
On Mon, 24 Jun 2002, Craig R. McClanahan wrote:

> On Mon, 24 Jun 2002, Milt Epstein wrote:
[ ... ]
>

Thanks for the info.


> > Also, is this something that only applies to Tomcat standalone, or
> > will it work when Tomcat is integrated with Apache?  If so, how
> > does it take care of the neccesary Apache httpd directives (either
> > JkMount or WebAppDeploy or whatever) to make sure Apache forwards
> > the appropriate requests to Tomcat.
>
> These tasks are targeted at Tomcat standalone.  They don't do
> anything about restarting your web server for you (and, AFAIK, you
> don't have any choice -- Apache, at least, does not have any notion
> of dynamic deployment without restarting, although the restart
> process can be pretty quick).

But it's more than just a matter of restarting Apache, right?  Even
with a restart, Apache has to know about the new URL's/contexts.  And
can that be done without modifying Apache's httpd.conf file?

(I'm asking because we may be setting up an environment with separate
"service" managers and "system" managers, with the service managers
having access to all the Tomcat stuff, but not the Apache stuff --
although they probably will be able to stop/start Apache.)

Thanks.

Milt Epstein
Research Programmer
Systems and Technology Services (STS)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
mepstein@uiuc.edu


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: question about hot deployment and manager app....

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 24 Jun 2002, Milt Epstein wrote:

> Date: Mon, 24 Jun 2002 21:41:17 -0500 (CDT)
> From: Milt Epstein <me...@uiuc.edu>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Cc: Jacob Kjome <ho...@visi.com>
> Subject: Re: question about hot deployment and manager app....
>
> On Mon, 24 Jun 2002, Craig R. McClanahan wrote:
>
> > On Mon, 24 Jun 2002, Jacob Kjome wrote:
> >
> > > Date: Mon, 24 Jun 2002 18:30:02 -0500
> > > From: Jacob Kjome <ho...@visi.com>
> > > Reply-To: Tomcat Users List <to...@jakarta.apache.org>,
> > >      Jacob Kjome <ho...@visi.com>
> > > To: Tomcat Users List <to...@jakarta.apache.org>
> > > Subject: question about hot deployment and manager app....
> > >
> > > I've been using the ant tasks for the manager app and they are
> > > really slick.  Makes testing much easier.
> > >
> > > However, how does one dynamically install an application when one
> > > has to specify context stuff in the server.xml or in a standalone
> > > [myapp].xml (using Tomcat 4.1.3)?
> [ ... ]
>
> Can you elaborate on this "hot deployment" and Ant tasks?  By "hot
> deployment", do you just mean being able to deploy/install/start a web
> application using Tomcat's manager application?

Yes.

If you have Tomcat 4.1.x, the docs for this are at:

  http://localhost:8080/tomcat-docs/manager-howto.html

>  And does the Ant
> tasks aspect of it just allow this to be done in a more "batch" way,
> via the command line?

That's it exactly ... there are Ant task analogues to each of the
"commands" that Manager supports, with exactly the same parameters.

The only real enhancement is on the deploy task -- because that requires
an HTTP PUT operation, you can't really use it *without* the Ant task, or
an equivalent HTTP client application.

>  Also, is doing this via Ant tasks only
> available in Tomcat 4.1.X, not 4.0.X?  (I saw a description of it on
> the 4.1.X manager how-to page, but not the 4.0.X page).
>

*Some* of the Ant tasks *might* work in 4.0, but they have not been
tested, and I am certain that there are some incompatibilities.

> Also, is this something that only applies to Tomcat standalone, or
> will it work when Tomcat is integrated with Apache?  If so, how does
> it take care of the neccesary Apache httpd directives (either JkMount
> or WebAppDeploy or whatever) to make sure Apache forwards the
> appropriate requests to Tomcat.
>

These tasks are targeted at Tomcat standalone.  They don't do anything
about restarting your web server for you (and, AFAIK, you don't have any
choice -- Apache, at least, does not have any notion of dynamic deployment
without restarting, although the restart process can be pretty quick).

> Thanks.
>
> Milt Epstein
> Research Programmer
> Systems and Technology Services (STS)
> Campus Information Technologies and Educational Services (CITES)
> University of Illinois at Urbana-Champaign (UIUC)
> mepstein@uiuc.edu
>

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


mod_jk JkAutoMount

Posted by Milt Epstein <me...@uiuc.edu>.
Anyone know anything about the mod_jk directive JkAutoMount?  I've
seen some about it in the documentation, in the source, and via a web
search, but it's all a little bit sketchy.  It sounds like it can be
used instead of JkMount, to have the web server query the servlet
container for what URL's it's supposed to forward (and to what
contexts) to Tomcat.  But it's not clear that's what it does.  And
it's not clear it's been fully implemented.  And it's not clear which
version of mod_jk it's part of.

If anyone can shed some light on these questions, I'd appreciate it.

Milt Epstein
Research Programmer
Systems and Technology Services (STS)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
mepstein@uiuc.edu


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


mod_jk JkAutoMount

Posted by Milt Epstein <me...@uiuc.edu>.
Anyone know anything about the mod_jk directive JkAutoMount?  I've
seen some about it in the documentation, in the source, and via a web
search, but it's all a little bit sketchy.  It sounds like it can be
used instead of JkMount, to have the web server query the servlet
container for what URL's it's supposed to forward (and to what
contexts) to Tomcat.  But it's not clear that's what it does.  And
it's not clear it's been fully implemented.  And it's not clear which
version of mod_jk it's part of.

If anyone can shed some light on these questions, I'd appreciate it.

Milt Epstein
Research Programmer
Systems and Technology Services (STS)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
mepstein@uiuc.edu


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: question about hot deployment and manager app....

Posted by Milt Epstein <me...@uiuc.edu>.
On Mon, 24 Jun 2002, Craig R. McClanahan wrote:

> On Mon, 24 Jun 2002, Jacob Kjome wrote:
>
> > Date: Mon, 24 Jun 2002 18:30:02 -0500
> > From: Jacob Kjome <ho...@visi.com>
> > Reply-To: Tomcat Users List <to...@jakarta.apache.org>,
> >      Jacob Kjome <ho...@visi.com>
> > To: Tomcat Users List <to...@jakarta.apache.org>
> > Subject: question about hot deployment and manager app....
> >
> > I've been using the ant tasks for the manager app and they are
> > really slick.  Makes testing much easier.
> >
> > However, how does one dynamically install an application when one
> > has to specify context stuff in the server.xml or in a standalone
> > [myapp].xml (using Tomcat 4.1.3)?
[ ... ]

Can you elaborate on this "hot deployment" and Ant tasks?  By "hot
deployment", do you just mean being able to deploy/install/start a web
application using Tomcat's manager application?  And does the Ant
tasks aspect of it just allow this to be done in a more "batch" way,
via the command line?  Also, is doing this via Ant tasks only
available in Tomcat 4.1.X, not 4.0.X?  (I saw a description of it on
the 4.1.X manager how-to page, but not the 4.0.X page).

Also, is this something that only applies to Tomcat standalone, or
will it work when Tomcat is integrated with Apache?  If so, how does
it take care of the neccesary Apache httpd directives (either JkMount
or WebAppDeploy or whatever) to make sure Apache forwards the
appropriate requests to Tomcat.

Thanks.

Milt Epstein
Research Programmer
Systems and Technology Services (STS)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
mepstein@uiuc.edu


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: question about hot deployment and manager app....

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 24 Jun 2002, Jacob Kjome wrote:

> Date: Mon, 24 Jun 2002 18:30:02 -0500
> From: Jacob Kjome <ho...@visi.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>,
>      Jacob Kjome <ho...@visi.com>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: question about hot deployment and manager app....
>
>
> Hi,
>
> I've been using the ant tasks for the manager app and they are really
> slick.  Makes testing much easier.
>
> However, how does one dynamically install an application when one has
> to specify context stuff in the server.xml or in a standalone
> [myapp].xml (using Tomcat 4.1.3)?
>

I do this by using the "install" task that installs a "context
configuration file".  What's that, you might ask?  It's simply an XML file
that contains the <Context> element for your webapp, including all of its
nested tags for the custom configuration you need.  Something like this:

  <target name="install" depends="main"
    <install url="${url}" username="${username}" password="${password}"
     path="/myapp" war="file://${build.home}/myapp.xml"/>

In later versions (starting with 4.1.5 I think) you can also use this kind
of thing with the deploy command -- simply put a "META-INF/context.xml"
file in your WAR file that is uploaded.

> I'd like to run my builds from anywhere and not have Tomcat attempt to
> load the app up at startup.  I need to specify the context in the
> [myapp].xml because I have Reource and ResourceParams for JDBC
> connection pooling.
>
> Is this impossible or am I just missing something?
>

Yep ... it is definitely possible, and very handy.

>
> --
> Best regards,
>  Jacob                          mailto:hoju@visi.com
>

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>