You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "denis.r" <de...@hp.com> on 2009/02/23 14:40:58 UTC

Enabling CGI in Tomcat 6 affect all webapps.

Hi,

I followed the instructions on how to enable CGIs in Tomcat 6 found at:
http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html . This works fine for
my webapp that has a CGI, but unfortunately it affects ALL my webapps within
the container. Even those that don't have CGIs. The webapps that don't have
CGIs now get errors claiming they must set privileged in order to use
CGIServlet, even though they aren't using CGIServlet. Is there any way to
turn this on just for the webapp using CGIs? See error message below:

SEVERE: Error deploying web application directory ROOT
java.lang.SecurityException: Servlet of class
org.apache.catalina.servlets.CGIServlet is privileged and cannot be loaded
by this web application
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1145)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
        at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
        at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
        at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
        ...

Denis
-- 
View this message in context: http://www.nabble.com/Enabling-CGI-in-Tomcat-6-affect-all-webapps.-tp22161635p22161635.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Enabling CGI in Tomcat 6 affect all webapps.

Posted by Mark Thomas <ma...@apache.org>.
denis.r wrote:
> 
> 
> Mark Thomas-18 wrote:
>> denis.r wrote:
>>>> Hi,
>>>> I followed the instructions on how to enable CGIs in Tomcat 6 found at:
>>>> http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html . This works fine
>>>> for
>>>> my webapp that has a CGI, but unfortunately it affects ALL my webapps
>>>> within
>>>> the container. Even those that don't have CGIs. The webapps that don't
>>>> have
>>>> CGIs now get errors claiming they must set privileged in order to use
>>>> CGIServlet, even though they aren't using CGIServlet. Is there any way
>>>> to
>>>> turn this on just for the webapp using CGIs?
>>> Move the CGIServlet definition and mapping from the global web.xml
>>> (CATALINA_BASE/conf/web.xml) to your web application's web.xml.
>>> Mark
>> Moving the config to the application's web.xml did the trick. Thank you.
>> It would be great if the documentation suggested this instead of modifying
>> the global config. In fact it should be the standard way to do it.

Good to hear this is working for you.

Patches, including for the documentation, are always welcome ;)

Mark

 Now
>> that you suggested it, it makes perfect sense. I only want this enabled
>> for web apps that have CGIs defined, not the entire container.
>>
>> Denis
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Enabling CGI in Tomcat 6 affect all webapps.

Posted by "denis.r" <de...@hp.com>.


Mark Thomas-18 wrote:
> 
> denis.r wrote:
>>> Hi,
>>> I followed the instructions on how to enable CGIs in Tomcat 6 found at:
>>> http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html . This works fine
>>> for
>>> my webapp that has a CGI, but unfortunately it affects ALL my webapps
>>> within
>>> the container. Even those that don't have CGIs. The webapps that don't
>>> have
>>> CGIs now get errors claiming they must set privileged in order to use
>>> CGIServlet, even though they aren't using CGIServlet. Is there any way
>>> to
>>> turn this on just for the webapp using CGIs?
> 
>> Move the CGIServlet definition and mapping from the global web.xml
>> (CATALINA_BASE/conf/web.xml) to your web application's web.xml.
> 
>> Mark
> 
> Moving the config to the application's web.xml did the trick. Thank you.
> It would be great if the documentation suggested this instead of modifying
> the global config. In fact it should be the standard way to do it. Now
> that you suggested it, it makes perfect sense. I only want this enabled
> for web apps that have CGIs defined, not the entire container.
> 
> Denis
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Enabling-CGI-in-Tomcat-6-affect-all-webapps.-tp22161635p22176403.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Enabling CGI in Tomcat 6 affect all webapps.

Posted by Mark Thomas <ma...@apache.org>.
denis.r wrote:
> Hi,
> 
> I followed the instructions on how to enable CGIs in Tomcat 6 found at:
> http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html . This works fine for
> my webapp that has a CGI, but unfortunately it affects ALL my webapps within
> the container. Even those that don't have CGIs. The webapps that don't have
> CGIs now get errors claiming they must set privileged in order to use
> CGIServlet, even though they aren't using CGIServlet. Is there any way to
> turn this on just for the webapp using CGIs?

Move the CGIServlet definition and mapping from the global web.xml
(CATALINA_BASE/conf/web.xml) to your web application's web.xml.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Enabling CGI in Tomcat 6 affect all webapps.

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: denis.r [mailto:denis.rachal@hp.com]
> Subject: Enabling CGI in Tomcat 6 affect all webapps.
>
> This works fine for my webapp that has a CGI, but
> unfortunately it affects ALL my webapps

Instead of uncommenting the CGIServlet area in conf/web.xml, copy the <servlet> and <servlet-mapping> entries for cgi to the desired webapp's WEB-INF/web.xml file.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org