tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: Deploying Web Application Programmatically
Date Wed, 09 Oct 2002 22:34:11 GMT
I'd suggest having your administrative application use an
HttpURLConnection to contact the manager webapp and use the "deploy"
command (Tomcat 4.1 only).  Besides eliminating the need for making your
admin servlet go through all the hoops needed to be a ContainerServlet,
you can also deploy to remote Tomcat instances this way.

For a starting point, I'd look at the Tomcat 4.1 source code for the Ant
<deploy> task (org.apache.catalina.ant.DeployTask) and the underlying base
class (org.apache.catalina.ant.AbstractCatalinaTask).

Craig


On Wed, 9 Oct 2002, Scott Goldstein wrote:

> Date: Wed, 9 Oct 2002 18:21:55 -0400
> From: Scott Goldstein <sdgoldst@mailandnews.com>
> Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> Subject: Deploying Web Application Programmatically
>
> I'm building a feature into a web application in which I need to deploy other
> web applications to Tomcat programmatically.  I've taken a look at the
> ManagerServlet for an example of how to do this and I have a quesion.
>
> 1.  Is there any way to access the org.apache.catalina.Deployer instance
> outside of a servlet?  In other words, do I have to write a Servlet which
> implements the ContainerServlet interface?
>
> The reason I ask, is that the code that handles the web application deployment
> responsibilities currently is designed such that it does not have access to
> the http request and response objects.  If possible, I would like to keep it
> this way.  If I do, I can't do a RequestDispatcher.include() to a
> ContainerServlet implementation, which appears to be the only way to access
> the Deployer instance.
>
> Do I have any other options?
>
> Thanks.
>
> Scott
>
> ------------------------------------------------------------
> "Just a mirror for the sun...
>  My smiling eyes are just a mirror for the sun."
> ------------------------------------------------------------
>
>
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
>
>


--
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