Hi,
I am trying to run a CGI script on tomcat, I made all the configuration changes required to run CGIs in tomcat. I am able to call the cgi script but it is returning the following exception.

INFO: cgi: Caught exception java.io.IOException: CreateProcess: "path\webapps\ROOT\WEB-INF\cgi\test.cgi" error=193
org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet cgi threw exception
java.io.IOException: CreateProcess: "C:\Documents and Settings\TCS\Desktop\Webhosting\Search_Engine\apac he-tomcat-6.0.37\webapps\ROOT\WEB-INF\cgi\test.cgi" error=193
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java :451)
at java.lang.Runtime.exec(Runtime.java:591)
at org.apache.catalina.servlets.CGIServlet$CGIRunner. run(CGIServlet.java:1647)
at org.apache.catalina.servlets.CGIServlet.doGet(CGIS ervlet.java:609)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:723)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.proces s(Http11AprProcessor.java:879)
at org.apache.coyote.http11.Http11AprProtocol$Http11C onnectionHandler.process(Http11AprProtocol.java:61 7)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run( AprEndpoint.java:1760)

and the browser returns following error:

HTTP Status 500 - CreateProcess: "path\webapps\ROOT\WEB-INF\cgi\test.cgi" error=193

type Exception report

message CreateProcess: "path\webapps\ROOT\WEB-INF\cgi\test.cgi" error=193

description The server encountered an internal error that prevented it from fulfilling this request.

exception

java.io.IOException: CreateProcess: "C:\Documents and Settings\TCS\Desktop\Webhosting\Search_Engine\apac he-tomcat-6.0.37\webapps\ROOT\WEB-INF\cgi\test.cgi" error=193
java.lang.ProcessImpl.create(Native Method)
java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
java.lang.ProcessImpl.start(ProcessImpl.java:30)
java.lang.ProcessBuilder.start(ProcessBuilder.java :451)
java.lang.Runtime.exec(Runtime.java:591)
org.apache.catalina.servlets.CGIServlet$CGIRunner. run(CGIServlet.java:1647)
org.apache.catalina.servlets.CGIServlet.doGet(CGIS ervlet.java:609)
javax.servlet.http.HttpServlet.service(HttpServlet .java:617)
javax.servlet.http.HttpServlet.service(HttpServlet .java:723)



test .cgi is the cgi script

#!C:\Perl\bin\perl.exe
# filename: test1.cgi
print "Content-type: text/html\n\n";
print "Hello, world!\n"


Please help me out with this.