Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tomcat 4 & CGI Enabling...

4 views
Skip to first unread message

Randy K. Secrist

unread,
Mar 11, 2002, 8:39:57 PM3/11/02
to
Hello,

I am trying to enable Tomcat 4.0x to run perl cgi scripts. I have followed
all the installation instructions - renaming the jar files, and uncommenting
the servlet mapping, and servlet definition in the /conf/web.xml.
Additionally, I created a cgi folder in the examples context WEB-INF
folder - with perl scripts in it.
I can compile and run the perl scripts from the command line...

However - when I run the sample scripts that come with the source -
(test-cgi.pl) for instance - I get a java runtime error:
java.io.IOException: CreateProcess: perl
C:\Apache\webapps\examples\WEB-INF\cgi\test-cgi.pl error=2

Has anyone experienced this?

Randy
www.secristfamily.com

The following info comes from the webapp log file - it includes the stack
trace...

2002-03-11 18:27:24 cgi: findCGI: path=/test-cgi.pl,
C:\Apache\webapps\examples\WEB-INF/cgi
2002-03-11 18:27:24 cgi: findCGI:
currentLoc=C:\Apache\webapps\examples\WEB-INF\cgi
2002-03-11 18:27:24 cgi: findCGI:
currentLoc=C:\Apache\webapps\examples\WEB-INF\cgi
2002-03-11 18:27:24 cgi: findCGI: FOUND cgi at
C:\Apache\webapps\examples\WEB-INF\cgi\test-cgi.pl
2002-03-11 18:27:24 cgi: findCGI calc: name=test-cgi.pl,
path=C:\Apache\webapps\examples\WEB-INF\cgi\test-cgi.pl,
scriptname=/examples/cgi-bin\test-cgi.pl, cginame=\test-cgi.pl
2002-03-11 18:27:24 cgi: runCGI(envp=[{HTTP_USER_AGENT=Mozilla/4.0
(compatible; MSIE 5.01; Windows NT 5.0), HTTP_ACCEPT_ENCODING=gzip, deflate,
REQUEST_METHOD=GET, AUTH_TYPE=, HTTP_ACCEPT_LANGUAGE=en-us, SERVER_NAME=neo,
SERVER_SOFTWARE=TOMCAT, HTTP_HOST=neo, GATEWAY_INTERFACE=CGI/1.1,
X_TOMCAT_SCRIPT_PATH=C:\Apache\webapps\examples\WEB-INF\cgi\test-cgi.pl,
REMOTE_ADDR=10.0.0.1, SERVER_PROTOCOL=HTTP/1.0, PATH_INFO=,
REMOTE_HOST=CYPHER, QUERY_STRING=, HTTP_CONNECTION=close, SERVER_PORT=80,
CONTENT_TYPE=, CONTENT_LENGTH=, SCRIPT_NAME=/examples/cgi-bin\test-cgi.pl,
HTTP_ACCEPT=*/*, REMOTE_USER=, REMOTE_IDENT=}],
command=C:\Apache\webapps\examples\WEB-INF\cgi\test-cgi.pl)
2002-03-11 18:27:24 StandardWrapperValve[cgi]: Servlet.service() for servlet
cgi threw exception
java.io.IOException: CreateProcess: perl
C:\Apache\webapps\examples\WEB-INF\cgi\test-cgi.pl error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:63)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:550)
at java.lang.Runtime.exec(Runtime.java:416)
at
org.apache.catalina.servlets.CGIServlet$CGIRunner.run(CGIServlet.java:1585)
at org.apache.catalina.servlets.CGIServlet.doGet(CGIServlet.java:635)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


Yas Poptani

unread,
Mar 13, 2002, 2:19:06 PM3/13/02
to
This may sound like a silly question but why not use apache and mod perl
together linking that to tomcat using the ajp/warp connector. You will get
better performance and more stability (and less issues).

Yas.
"Randy K. Secrist" <r...@cc.usu.edu> wrote in message
news:N%cj8.23711$af7.18039@rwcrnsc53...

0 new messages