Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Rahul,

On 6/20/14, 3:10 PM, Rahul R wrote:
This is from my conf/web.xml

<servlet> <servlet-name>cgi</servlet-name>

<servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>


<init-param>
<param-name>debug</param-name> <param-value>0</param-value> </init-param> <init-param> <param-name>cgiPathPrefix</param-name> <param-value>WEB-INF/cgi</param-value> </init-param> <init-param> <param-name>passShellEnvironment</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>executable</param-name> <param-value>perl</param-value> </init-param>

<load-on-startup>5</load-on-startup> </servlet>


<servlet-mapping> <servlet-name>cgi</servlet-name> <url-pattern>/cgi-bin/*</url-pattern> </servlet-mapping>


Please let me know what do you mean by privileged usage.

https://tomcat.apache.org/tomcat-7.0-doc/cgi-howto.html

Since you have mapped the CGIServlet to /cgi-bin, then you will want
to have your HTML file (located in the webapp root) to reference
"/cgi-bin/read_toggle.cgi" as the action.

Note that the URL reference is mapped from the URL space
(/cgi-bin/read_toggle.cgi) into the webapp's resource space
(WEB-INF/cgi/read_toggle.cgi) which is why the paths don't appear to
match.

Finally, if the Perl script isn't that complicated, you should
consider re-writing it in Java since you are using a Java application
server. It will be much easier to deal with everything that way.


Who said that the cgi-bin script was perl ? (not saying that it isn't, but nobody said it was either). As it stands, whatever it is, it is being run (at first) by perl. But if perl notice another interpreter in the shebang line, it will happily cede its turn.

Anyway, it raises the fundamental question of why go though all the trouble to run a (possibly perl) cgi-bin script within Tomcat ?

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

Reply via email to