On Jul 13, 2008, at 1:22 PM, Peter L. Berghold wrote:

Hash: SHA1

Kevan Miller wrote:

Here's general info for Tomcat --

Read this two or three times (as well as the comments in the web.xml
file) before I posted. Did what I thought it was telling me to do and so
far NG.

Place your scripts in WEB-INF/cgi/

Did that after trying to be "stubborn" and leave them in "cgi-bin" where
they were located while the website was hosted at the previous
provider's server.  Now I am running in a VPS and have to re-invent things.

Borrowing from the tomcat instructions use this as your WEB-INF/web.xml:

Snip.  The CGI script in question (written in Perl) doesn't seem to be
getting executed still. In fact the purpose of the script is to generate
"on the fly" javascript and what is coming back instead is the Perl code
itself instead of the javascript the Perl script should be generating.

I tried setting the value for "executable" first to /usr/bin/perl and
then to just perl and this resulted in tomcat generating an exception
and not being able to start and complaints from my club members that
they couldn't get to the site while all that was going on. (Figures..
when I'm working on the site, they try to access it just then.)

What disturbs me slightly is I did a search for the
servlets-ssi.rename-to-jar or even servlets-ssi.jar file from the top
level in Geronimo and did not find it.  Should I be worried about that
or is that deprecated?

Tomcat 5 required you to rename servlets-cgi.renametojar to servlets-cgi.jar. It's not necessary in Tomcat 6 (Geronimo 2.0/2.1). The comments in Tomcat's web.xml configuration file are not correct.

I've created a Jira to make it simpler to enable cgi support in Geronimo. Would be nice if this were a plugin and that the servlet would permit absolute file addressing (rather than relative addressing).

In the jira I posted a war and some instructions on enabling cgi-bin support on Tomcat. I've included instructions (a bit of a hack) to allow scripts to be placed in a <geronimo-home>/cgi-bin directory.

I've tested with a simple HelloWorld perl script and it worked for me...