2013/11/20 Felipe <felipeh...@gmail.com>: > Hello, > > I am running Manjaro Linux (0.8.7) using the linux 3.4.69 kernel on a Dell > XPS m1330 laptop. I am trying to run a sample webpage that uses perl and > cgi to handle a form. > These are the steps I took: > > * wget > http://mirrors.sonic.net/apache/tomcat/tomcat-8/v8.0.0-RC5/bin/apache-tomcat-8.0.0-RC5.tar.gz > * tar xvzf apache-tomcat-8.0.0-RC5.tar.gz > * mkdir ~/tomcat > * sudo mv apache-tomcat-8.0.0-RC5 ~/tomcat > * sudo vi ~/.bashrc > * append export JAVA_HOME=/usr/lib/jvm/java-7-openjdk > * append export CATALINA_HOME=~/tomcat/apache-tomcat-8.0.0-RC5 > * run $CATALINA_HOME/bin/startup.sh > > I was able to pull up the tomcat control panel, I then edited the web.xml > file. I uncommented the cgi servlet block as well as the cgi-servlet > mapping block. I also changed path prefix: > <init-param> > <param-name>cgiPathPrefix</param-name> > <param-value>WEB-INF/cgi-bin/*</param-value> > </init-param> > <load-on-startup>5</load-on-startup> > </servlet>
1. conf/web.xml provides defaults to all web applications that are deployed on Tomcat. Instead of uncommenting the servlet and servlet-mapping there you would better copy them into WEB-INF/web.xml file of your own web application. 2. Your web application (aka context) must be marked as "privileged". Non-privileged web applications are not allowed to use CgiServlet. This servlet poses a security risk and thus this additional protection is in place. 3. While it is technically possible to use Perl with Apache Tomcat (as well as to start external programs from within Java), using it with Apache HTTPD would provide better performance. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org