tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Francois Arcand <jfarc...@apache.org>
Subject Re: Deploying Web Application Programmatically
Date Wed, 09 Oct 2002 22:29:09 GMT


Scott Goldstein wrote:

>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?
>
If you are using the SecurityManager, you can't. You will need to change 
the catalina.policy file and add 
accessClassInPackage.org.apache.catalina. Be carefull and don't forget 
that others app will get access to those classes.


>
>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.
>
You can always use the Ant Tasks that comes with Tomcat and make some 
changes on it (specifically, the org.apache.catalina.DeployTask or use 
it directly.

-- Jeanfrancois


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