We are trying to enable our
Tomcat 6 server to run a CGI script in Perl. We went to tomcat6/conf/web.xml and uncommented the portions of XML that defined the CGI
servlet, setting cgiPathPrefix to WEB-INF/cgi, and its mapping, setting the URL
pattern to cgi/* . We created a WEB-INF/cgi directory and unpacked scripts into it. We downloaded servlets-cgi.renametojar from a Tomcat 5 distribution, placed it in tomcat6/lib/, and renamed it to servlets-cgi.jar. (There was no such file in the Tomcat 6 distribution.) We restarted Tomcat after each step and pointed our browser to the CGI script URL. The browser loads the script as text, but does not run it. The text tells us that we haven't configured Tomcat properly to run CGI scripts. The first line in the CGI script is
#!/usr/bin/perl
and we have confirmed that we have a working Perl installation at that location.
Any suggestions?