> From: Grossman, Robert B [mailto:robert.gross...@uky.edu]
> Subject: how do I enable CGI scripts in Tomcat 6?
> 
> The descriptions of the CGI enabling process that we have found on 
> the Web, e.g. http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html

That's the right one.

> and 
> http://www.wellho.net/solutions/java-running-cgi-scripts-in-apache-tomcat.html
>  

Sadly out of date and seriously broken.  Use the real doc.

> We already had set <context privileged="true"> in Tomcat's context.xml.

That's wrong.  First, it's <Context>, not <context> - case matters.  Second, 
you shouldn't be setting this attribute globally, but rather in just the 
webapps that need it.

> We created a WEB-INF/cgi directory in our web app's hierarchy.  In
> $CATALINA_BASE/conf/web.xml, we uncommented the CGI servlet description
> and servlet matching, and we set the cgiPathPrefix to WEB-INF/cgi/ and
> the servlet matching pattern to /cgi/*.

Please post (via copy and paste) those sections of conf/web.xml so we can see 
what you actually did.  Too often people see what they expect, not what's there.

> We downloaded servlets-cgi.renametojar from a Tomcat 5 distribution,

Bad move.  Where in the Tomcat 6 doc does it say to do that?  You just broke 
your Tomcat 6 installation.

> Tomcat 6 did not come with this file.

Because it doesn't need it.

> Nor, for that matter, can we find a preexisting cgi-bin directory anywhere.

Nor should you.  That's simply a part of the URL that triggers the CGI servlet, 
not an actual directory.  The script path is specified by the cgiPathPrefix 
parameter.

> when we browse to a CGI script in WEB-INF/cgi/ (we actually access 
> it through a symlink in a different, publicly accessible directory)

Don't muck with symlinks until you've got it working.  No point in introducing 
extra trouble spots until the basics are functional.

 - 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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to