Tomcat runs as root, enable cgi's for Tomcat. Seems simple.
rls
Scott Goldstein <[EMAIL PROTECTED]>
10/18/2002 08:59 AM
Please respond to "Tomcat Users List"
To: "Robert L Sowders" <[EMAIL PROTECTED]>, Tomcat Users List
<[EMAIL PROTECTED]>
cc:
Subject: RE: Problem writing deployment Servlet
This is a possibility. But, the problem with this solution, is that it
assumes certain file system priveledges. Also, I think calling a Java API
from a web application would be much cleaner.
Thanks for the suggestion, though.
Scott
>===== Original Message From "Robert L Sowders" <[EMAIL PROTECTED]> =====
>Uh,
>
>Probably a dumb answer but couldn't you make a simple cgi that copied a
>.war file to the webapps directory for auto deployment?
>
>rls
>
>
>
>
>
>
>Scott Goldstein <[EMAIL PROTECTED]>
>10/17/2002 09:44 PM
>Please respond to "Tomcat Users List"
>
>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> cc:
> Subject: Problem writing deployment Servlet
>
>I didn't get any replies on this question, so I thought I would try
>again.
>
>I recently tried building a deployment tool by implementing the
>ContainerServlet
>and had some problems. When I first tried to access the Servlet, I got
>the
>following exception:
>
>java.lang.NoClassDefFoundError: org/apache/catalina/ContainerServlet
> at java.lang.ClassLoader.defineClass0(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
> at
>java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
> at
>org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoa
der.java:1643)
>
> at
>org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java
:937)
> at
>org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java
:1372)
>
> at
>org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java
:1254)
>
> at
>org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:867
)
> at
>org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
> at
>org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.j
ava:652)
>
> at
>org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatche
r.java:574)
>
> at
>org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.
java:497)
>
>I then tried copying the catalina.jar file into the WEB-INF/lib
>directory of the
>web app and I got this exception:
>
>java.lang.InstantiationException:
>com.epicentric.portlet.deployment.internal.TomcatModuleDeployer$TomcatModuleD
eployerServlet
>
> at java.lang.Class.newInstance0(Class.java:281)
> at java.lang.Class.newInstance(Class.java:249)
> at
>org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:886
)
> at
>org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
> at
>org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.j
ava:652)
>
> at
>org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatche
r.java:574)
>
> at
>org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.
java:497)
>
>Does anyone know how to properly write an implementation of an
>org.apache.catalina.ContainerServlet?
>
>Thanks for the help.
>
>Scott
>
>Jean-Francois Arcand wrote:
>
>> 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>
>
>
>--
>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>
>
>
>
>
>
>--
>To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
>For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>
------------------------------------------------------------
"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>