Tomcat 5.0.16 executes binary CGI scripts as Perl scripts
I am new to 5.0.16 but I have used Tomcat before in the Past. I think I configured my CGI settings correctly according to the documentation, I uncommented the servlet and servlet-mappings sections, renamed the Jar file. I also have .exe MIME mapped as an Application (the default values I didn't muck with any of these). I am running on Windows 2000. My script is installed into ..\Root\WEB-INF\cgi\cgi.exe I am trying to run a binary C-Style CGI script. It appears that tomcat is treating my .exe file as a Perl script. The 500 Error Output reads... java.io.IOException: CreateProcess: perl C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT\WEB-INF\cgi\cgi.exe error=2 I am not sure how to resolve this issue, it looks like from the error Tomcat thinks me exe is a perl script. I didn't know there was a specific configuration for how scripts are handled, it appears the MIME mappings are being ignored or are not used in script execution. Any ideas, is there a way to unmap .exe to perl? I know Tomcat is designed primarily for servlets, this is a special scenario where Tomcat cannot be substituted for Apache (and Apache runs the script A-OK). -- Below are specific details about the error msg and web.xml config settings - Entire error: 2003-12-17 18:41:25 StandardContext[]cgi: findCGI: currentLoc=C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT\WEB-INF\cgi 2003-12-17 18:41:25 StandardContext[]cgi: findCGI: FOUND cgi at C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT\WEB-INF\cgi\cgi.exe 2003-12-17 18:41:25 StandardContext[]cgi: findCGI calc: name=cgi.exe, path=C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT\WEB-INF\cgi\cgi.exe, scriptname=/cgi-bin\cgi.exe, cginame=\cgi.exe 2003-12-17 18:41:25 StandardContext[]cgi: runCGI(envp=[{HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; .NET CLR 1.0.3705; .NET CLR 1.1.4322), HTTP_ACCEPT_ENCODING=gzip, deflate, REQUEST_METHOD=GET, AUTH_TYPE=, HTTP_ACCEPT_LANGUAGE=en-us,de;q=0.5, SERVER_NAME=pinecone, SERVER_SOFTWARE=TOMCAT, HTTP_HOST=pinecone, GATEWAY_INTERFACE=CGI/1.1, X_TOMCAT_SCRIPT_PATH=C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT\WEB-INF\cgi\cgi.exe, REMOTE_ADDR=192.168.1.144, SERVER_PROTOCOL=HTTP/1.1, PATH_INFO=, REMOTE_HOST=192.168.1.144, QUERY_STRING=command=LoginScreen, HTTP_CONNECTION=Keep-Alive, SERVER_PORT=8080, CONTENT_TYPE=, CONTENT_LENGTH=, SCRIPT_NAME=/cgi-bin\cgi.exe, HTTP_ACCEPT=*/*, REMOTE_USER=, REMOTE_IDENT=}], command=C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT\WEB-INF\cgi\cgi.exe) 2003-12-17 18:41:25 StandardWrapperValve[cgi]: Servlet.service() for servlet cgi threw exception java.io.IOException: CreateProcess: perl C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT\WEB-INF\cgi\cgi.exe error=2 at java.lang.Win32Process.create(Native Method) at java.lang.Win32Process.init(Win32Process.java:66) at java.lang.Runtime.execInternal(Native Method) at java.lang.Runtime.exec(Runtime.java:566) at java.lang.Runtime.exec(Runtime.java:428) at org.apache.catalina.servlets.CGIServlet$CGIRunner.run(CGIServlet.java:1578) at org.apache.catalina.servlets.CGIServlet.doGet(CGIServlet.java:626) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156) at
RE: Can Tomcat really run cgi scripts?
Well my head is really a bloody mess now but after seeing that other IOException: CreateProcess errors for other applications often referred to both path and pathext environmental variables I decided to add .pl and .cgi to pathext. Path was already corrected and I tinkered with it endlessly. That still didn't work. Until I rebooted system. I assume that once I did so Tomcat figured out the .pl/.cgi extensions and processed the cgi file properly. Sending this just in case anyone else runs into the problem. I've found a number of references to the problem on google but no answers. -Original Message- From: Januski, Ken [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 3:21 PM To: Tomcat Users List Subject: RE: Can Tomcat really run cgi scripts? Beat my head against wall for another couple hours and still end up with this error. Anyone have any other ideas? java.io.IOException: CreateProcess: perl C:\Tomcat4112\webapps\examples\WEB-INF\cgi\exp.pl lname=januski fname=ken error=2 at java.lang.Win32Process.create(Native Method) at java.lang.Win32Process.(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:1583) 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) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:471) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:380) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:533) at java.lang.Thread.run(Thread.java:536) -Original Message- From: Januski, Ken [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 1:01 PM To: Tomcat Users List Subject: RE: Can Tomcat really run cgi scripts? Thanks Chris, I've tried !#c:\perl\bin\perl.exe, #!c:\perl\bin, #!perl, and #!/usr/bin/perl and get same error on each. I've also added perl to the path environmental PATH variable. I do think that you're right about
Can Tomcat really run cgi scripts?
I've been trying for last day to get Tomcat 4.1.12 to run a perl cgi script. I've done most of it based on this article: http://www.fawcette.com/javapro/2003_03/online/perl_teden_03_18_03/default_p f.aspx. But now I'm stuck with this error: java.io.IOException: CreateProcess: perl C:\Tomcat4112\webapps\examples\WEB-INF\cgi\exp.cgi In researching this on google I've found that a number of people have run into siimilar problems. Some of them solved it by adding Apache to the mix. I don't want to add Apache if I don't have to. So what I'm wondering is if anyone has had much success running perl scripts from cgi directory without using Apache? And also does anyone know how to get around the above error? Thanks, Ken P.S. The only reason I'm having to run perl is that I need to add iptc info to jpeg files and I've only found perl methods for doing so. If anyone can point me to a Java method of doing so I could avoid this problem for the time being.
Re: Can Tomcat really run cgi scripts?
Ken, But now I'm stuck with this error: java.io.IOException: CreateProcess: perl C:\Tomcat4112\webapps\examples\WEB-INF\cgi\exp.cgi This is likely to be due to the lack of PATH information available to the script itself. Try using #!/usr/bin/perl in your script instead of #!perl I've heard some complains about sub-process permissions, but my initial reaction is that they are errant complaints. -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can Tomcat really run cgi scripts?
Thanks Chris, I've tried !#c:\perl\bin\perl.exe, #!c:\perl\bin, #!perl, and #!/usr/bin/perl and get same error on each. I've also added perl to the path environmental PATH variable. I do think that you're right about missing PATH information so I'll keep experimenting. I just can't figure out what additional paths to try. Ken -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 12:53 PM To: Tomcat Users List Subject: Re: Can Tomcat really run cgi scripts? Ken, But now I'm stuck with this error: java.io.IOException: CreateProcess: perl C:\Tomcat4112\webapps\examples\WEB-INF\cgi\exp.cgi This is likely to be due to the lack of PATH information available to the script itself. Try using #!/usr/bin/perl in your script instead of #!perl I've heard some complains about sub-process permissions, but my initial reaction is that they are errant complaints. -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can Tomcat really run cgi scripts?
Beat my head against wall for another couple hours and still end up with this error. Anyone have any other ideas? java.io.IOException: CreateProcess: perl C:\Tomcat4112\webapps\examples\WEB-INF\cgi\exp.pl lname=januski fname=ken error=2 at java.lang.Win32Process.create(Native Method) at java.lang.Win32Process.(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:1583) 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) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:471) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:380) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:533) at java.lang.Thread.run(Thread.java:536) -Original Message- From: Januski, Ken [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 1:01 PM To: Tomcat Users List Subject: RE: Can Tomcat really run cgi scripts? Thanks Chris, I've tried !#c:\perl\bin\perl.exe, #!c:\perl\bin, #!perl, and #!/usr/bin/perl and get same error on each. I've also added perl to the path environmental PATH variable. I do think that you're right about missing PATH information so I'll keep experimenting. I just can't figure out what additional paths to try. Ken -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 12:53 PM To: Tomcat Users List Subject: Re: Can Tomcat really run cgi scripts? Ken, But now I'm stuck with this error: java.io.IOException: CreateProcess: perl C:\Tomcat4112\webapps\examples\WEB-INF\cgi\exp.cgi This is likely to be due to the lack of PATH information available to the script itself. Try using #!/usr/bin/perl in your script instead of #!perl I've heard some complains about sub-process permissions, but my initial reaction is that they are errant complaints. -chris
RE: Configuring and using cgi scripts in Tomcat
I have the j2ee.jar file in the classpath...should that not provide the current jdk. Allen -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 6:12 PM To: 'Tomcat Users List' Subject: RE: Configuring and using cgi scripts in Tomcat In the stack trace, root cause, you'll find: java.lang.NoSuchMethodError: java.lang.Runtime: method exec(Ljava/lang/String;[Ljava/lang/String;Ljava/io/File;)Ljava/lang/Proc ess; not found So something (org.apache.catalina.servlets.CGIServlet$CGIRunner.run) is trying to find a method called: java.langRuntime.exec(String, String[] File) But cannot find it. There is such a method, but only since JDK 1.3 So.. are you running at least 1.3? -Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 5:22 PM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat Okay... Found out that I did not have the mapping correct but when I changed it to go the ROOT/WEB-INF/cgi-bin. I have now getting the following error. Any help would be highly appreciate (even to the point of naming my next born after you.:-) ) Allen (error msg) HTTP Status 500 - -- -- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at javax.servlet.ServletException.(ServletException.java:132) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Applica tionFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValv e.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(Compiled Code) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValv e.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(Compiled Code) at org.apache.catalina.core.StandardContext.invoke(Compiled Code) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java :180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi spatcherVa lve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java :172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.valves.AccessLogValve.invoke(Compiled Code) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEn gineValve. java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter. java:223) at org.apache.coyote.http11.Http11Processor.process(Compiled Code) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle r.processC onnection(Http11Protocol.java:386) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Compiled Code) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Compiled Code) at java.lang.Thread.run(Thread.java:479) root cause java.lang.NoSuchMethodError: java.lang.Runtime: method exec(Ljava/lang/String;[Ljava/lang/String;Ljava/io/File;)Ljava /lang/Proc ess; not found at org.apache.catalina.servlets.CGIServlet
RE: Configuring and using cgi scripts in Tomcat
Howdy, All j2ee.jar provides in the tomcat classpath is a headache. J2ee.jar contains the servlet classes, which is bad (http://jakarta.apache.org/tomcat/faq/classnotfound.html#filter). Also search the list archives on this... Yoav Shapira Millennium ChemInformatics -Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 10:54 AM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat I have the j2ee.jar file in the classpath...should that not provide the current jdk. Allen -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 6:12 PM To: 'Tomcat Users List' Subject: RE: Configuring and using cgi scripts in Tomcat In the stack trace, root cause, you'll find: java.lang.NoSuchMethodError: java.lang.Runtime: method exec(Ljava/lang/String;[Ljava/lang/String;Ljava/io/File;)Ljava/lang/Pro c ess; not found So something (org.apache.catalina.servlets.CGIServlet$CGIRunner.run) is trying to find a method called: java.langRuntime.exec(String, String[] File) But cannot find it. There is such a method, but only since JDK 1.3 So.. are you running at least 1.3? -Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 5:22 PM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat Okay... Found out that I did not have the mapping correct but when I changed it to go the ROOT/WEB-INF/cgi-bin. I have now getting the following error. Any help would be highly appreciate (even to the point of naming my next born after you.:-) ) Allen (error msg) HTTP Status 500 - -- -- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at javax.servlet.ServletException.(ServletException.java:132) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Applica tionFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValv e.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(Compiled Code) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValv e.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(Compiled Code) at org.apache.catalina.core.StandardContext.invoke(Compiled Code) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java :180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi spatcherVa lve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java :172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.valves.AccessLogValve.invoke(Compiled Code) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEn gineValve. java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter. java:223) at org.apache.coyote.http11.Http11Processor.process(Compiled Code) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle r.processC onnection(Http11Protocol.java:386
RE: Configuring and using cgi scripts in Tomcat
-Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 9:54 AM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat I have the j2ee.jar file in the classpath...should that not provide the current jdk. Well, no. j2ee.jar is just a library. It happens to be quite large and covers a LOT of functionality. But it is not a java runtime, and it doesn't contain any of the core java (j2se) classes. From the docs on j2ee 1.3.1: Supported Operating Systems and Required Software This release relies on the Java 2 SDK, Standard Edition (J2SE). The reason Yoav recommends you dump j2ee.jar is that it contains a number of classes that Tomcat *already* has, and it's easier to avoid conflicts between different class versions by just removing the entirely un-necessary j2ee.jar from Tomcat's view. Where does JAVA_HOME point to? It should point to an installation of the J2SE JDK version 1.3.x or above. -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 6:12 PM To: 'Tomcat Users List' Subject: RE: Configuring and using cgi scripts in Tomcat In the stack trace, root cause, you'll find: java.lang.NoSuchMethodError: java.lang.Runtime: method exec(Ljava/lang/String;[Ljava/lang/String;Ljava/io/File;)Ljava /lang/Proc ess; not found So something (org.apache.catalina.servlets.CGIServlet$CGIRunner.run) is trying to find a method called: java.langRuntime.exec(String, String[] File) But cannot find it. There is such a method, but only since JDK 1.3 So.. are you running at least 1.3? -Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 5:22 PM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat Okay... Found out that I did not have the mapping correct but when I changed it to go the ROOT/WEB-INF/cgi-bin. I have now getting the following error. Any help would be highly appreciate (even to the point of naming my next born after you.:-) ) Allen (error msg) HTTP Status 500 - -- -- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at javax.servlet.ServletException.(ServletException.java:132) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Applica tionFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValv e.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(Compiled Code) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValv e.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(Compiled Code) at org.apache.catalina.core.StandardContext.invoke(Compiled Code) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java :180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi spatcherVa lve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java :172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.valves.AccessLogValve.invoke(Compiled Code) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEn gineValve. java
RE: Configuring and using cgi scripts in Tomcat
JAVA_HOME points to /usr/java1.2. In that directory I have the j2ee and it information. I am currently downloading the Java 2 SDK, Standard Edition 1.4.2_01. If I install this and put the information in the class path..will it provide me with what I need. Allen -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 10:26 AM To: 'Tomcat Users List' Subject: RE: Configuring and using cgi scripts in Tomcat -Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 9:54 AM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat I have the j2ee.jar file in the classpath...should that not provide the current jdk. Well, no. j2ee.jar is just a library. It happens to be quite large and covers a LOT of functionality. But it is not a java runtime, and it doesn't contain any of the core java (j2se) classes. From the docs on j2ee 1.3.1: Supported Operating Systems and Required Software This release relies on the Java 2 SDK, Standard Edition (J2SE). The reason Yoav recommends you dump j2ee.jar is that it contains a number of classes that Tomcat *already* has, and it's easier to avoid conflicts between different class versions by just removing the entirely un-necessary j2ee.jar from Tomcat's view. Where does JAVA_HOME point to? It should point to an installation of the J2SE JDK version 1.3.x or above. -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 6:12 PM To: 'Tomcat Users List' Subject: RE: Configuring and using cgi scripts in Tomcat In the stack trace, root cause, you'll find: java.lang.NoSuchMethodError: java.lang.Runtime: method exec(Ljava/lang/String;[Ljava/lang/String;Ljava/io/File;)Ljava /lang/Proc ess; not found So something (org.apache.catalina.servlets.CGIServlet$CGIRunner.run) is trying to find a method called: java.langRuntime.exec(String, String[] File) But cannot find it. There is such a method, but only since JDK 1.3 So.. are you running at least 1.3? -Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 5:22 PM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat Okay... Found out that I did not have the mapping correct but when I changed it to go the ROOT/WEB-INF/cgi-bin. I have now getting the following error. Any help would be highly appreciate (even to the point of naming my next born after you.:-) ) Allen (error msg) HTTP Status 500 - -- -- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at javax.servlet.ServletException.(ServletException.java:132) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Applica tionFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValv e.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(Compiled Code) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValv e.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(Compiled Code) at org.apache.catalina.core.StandardContext.invoke(Compiled Code) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java :180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi spatcherVa lve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java :172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled
RE: Configuring and using cgi scripts in Tomcat
It's probably called /usr/java1.2. because it : a) had j2ee1.2 in it? b) it had jdk 1.2 in it? If it's a), you don't even have a JDK. If it's b), then then JDK is too old. Either way, you don't have what you need. putting it in the classpath. That really is only important if you're compiling servlets or other java programs, and using the system classpath variable to do the compiling. Tomcat does not use system classpath variables. It uses JAVA_HOME. So just be sure to update JAVA_HOME to the newest JDK, and restart Tomcat. You should be good after that. -Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 10:49 AM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat JAVA_HOME points to /usr/java1.2. In that directory I have the j2ee and it information. I am currently downloading the Java 2 SDK, Standard Edition 1.4.2_01. If I install this and put the information in the class path..will it provide me with what I need. Allen -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 10:26 AM To: 'Tomcat Users List' Subject: RE: Configuring and using cgi scripts in Tomcat -Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 9:54 AM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat I have the j2ee.jar file in the classpath...should that not provide the current jdk. Well, no. j2ee.jar is just a library. It happens to be quite large and covers a LOT of functionality. But it is not a java runtime, and it doesn't contain any of the core java (j2se) classes. From the docs on j2ee 1.3.1: Supported Operating Systems and Required Software This release relies on the Java 2 SDK, Standard Edition (J2SE). The reason Yoav recommends you dump j2ee.jar is that it contains a number of classes that Tomcat *already* has, and it's easier to avoid conflicts between different class versions by just removing the entirely un-necessary j2ee.jar from Tomcat's view. Where does JAVA_HOME point to? It should point to an installation of the J2SE JDK version 1.3.x or above. -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 6:12 PM To: 'Tomcat Users List' Subject: RE: Configuring and using cgi scripts in Tomcat In the stack trace, root cause, you'll find: java.lang.NoSuchMethodError: java.lang.Runtime: method exec(Ljava/lang/String;[Ljava/lang/String;Ljava/io/File;)Ljava /lang/Proc ess; not found So something (org.apache.catalina.servlets.CGIServlet$CGIRunner.run) is trying to find a method called: java.langRuntime.exec(String, String[] File) But cannot find it. There is such a method, but only since JDK 1.3 So.. are you running at least 1.3? -Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 5:22 PM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat Okay... Found out that I did not have the mapping correct but when I changed it to go the ROOT/WEB-INF/cgi-bin. I have now getting the following error. Any help would be highly appreciate (even to the point of naming my next born after you.:-) ) Allen (error msg) HTTP Status 500 - -- -- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at javax.servlet.ServletException.(ServletException.java:132) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Applica tionFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValv e.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(Compiled Code) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValv e.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv
RE: Configuring and using cgi scripts in Tomcat
It is A... The machine this is on is a Sun with the 2.8 OS. The java directory was /usr/java1.2 and I add the current J2EE to it (at the time j2sdkee1.3.1) and I did not add a JDK. But this should be taken care of by adding Java 2 SDK, Standard Edition 1.4.2_01. I will try that and see what happens. Mike and Yoav..thanks for the help hopefully I can get this installed without any problems and everything works Allen -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 10:57 AM To: 'Tomcat Users List' Subject: RE: Configuring and using cgi scripts in Tomcat It's probably called /usr/java1.2. because it : a) had j2ee1.2 in it? b) it had jdk 1.2 in it? If it's a), you don't even have a JDK. If it's b), then then JDK is too old. Either way, you don't have what you need. putting it in the classpath. That really is only important if you're compiling servlets or other java programs, and using the system classpath variable to do the compiling. Tomcat does not use system classpath variables. It uses JAVA_HOME. So just be sure to update JAVA_HOME to the newest JDK, and restart Tomcat. You should be good after that. -Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 10:49 AM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat JAVA_HOME points to /usr/java1.2. In that directory I have the j2ee and it information. I am currently downloading the Java 2 SDK, Standard Edition 1.4.2_01. If I install this and put the information in the class path..will it provide me with what I need. Allen -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 10:26 AM To: 'Tomcat Users List' Subject: RE: Configuring and using cgi scripts in Tomcat -Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 9:54 AM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat I have the j2ee.jar file in the classpath...should that not provide the current jdk. Well, no. j2ee.jar is just a library. It happens to be quite large and covers a LOT of functionality. But it is not a java runtime, and it doesn't contain any of the core java (j2se) classes. From the docs on j2ee 1.3.1: Supported Operating Systems and Required Software This release relies on the Java 2 SDK, Standard Edition (J2SE). The reason Yoav recommends you dump j2ee.jar is that it contains a number of classes that Tomcat *already* has, and it's easier to avoid conflicts between different class versions by just removing the entirely un-necessary j2ee.jar from Tomcat's view. Where does JAVA_HOME point to? It should point to an installation of the J2SE JDK version 1.3.x or above. -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 6:12 PM To: 'Tomcat Users List' Subject: RE: Configuring and using cgi scripts in Tomcat In the stack trace, root cause, you'll find: java.lang.NoSuchMethodError: java.lang.Runtime: method exec(Ljava/lang/String;[Ljava/lang/String;Ljava/io/File;)Ljava /lang/Proc ess; not found So something (org.apache.catalina.servlets.CGIServlet$CGIRunner.run) is trying to find a method called: java.langRuntime.exec(String, String[] File) But cannot find it. There is such a method, but only since JDK 1.3 So.. are you running at least 1.3? -Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 5:22 PM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat Okay... Found out that I did not have the mapping correct but when I changed it to go the ROOT/WEB-INF/cgi-bin. I have now getting the following error. Any help would be highly appreciate (even to the point of naming my next born after you.:-) ) Allen (error msg) HTTP Status 500 - -- -- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at javax.servlet.ServletException.(ServletException.java:132) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Applica tionFilterChain.java:269
RE: Configuring and using cgi scripts in Tomcat
Howdy, Read the comments for the CGI servlet in $CATALINA_HOME/conf/web.xml. Yoav Shapira Millennium ChemInformatics -Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Monday, September 22, 2003 5:06 PM To: Tomcat Users List Subject: Configuring and using cgi scripts in Tomcat Hello... I am trying to configure Tomcat to run a perl script that is part of an application I am moving over from another server. Since this is one script I do not want to rewrite it so I thought that I could set the server to run CGI scripts. I have put the entries in the web.xml file and restarted the server but I cannot get the script to run. Has anyone had any success in doing this? Allen This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Configuring and using cgi scripts in Tomcat
I've read those comments and uncommented the lines specified but when I try to run the script it gives me that it is not available. Allen -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 7:55 AM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat Howdy, Read the comments for the CGI servlet in $CATALINA_HOME/conf/web.xml. Yoav Shapira Millennium ChemInformatics -Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Monday, September 22, 2003 5:06 PM To: Tomcat Users List Subject: Configuring and using cgi scripts in Tomcat Hello... I am trying to configure Tomcat to run a perl script that is part of an application I am moving over from another server. Since this is one script I do not want to rewrite it so I thought that I could set the server to run CGI scripts. I have put the entries in the web.xml file and restarted the server but I cannot get the script to run. Has anyone had any success in doing this? Allen This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message may contain proprietary or confidential company information. Any unauthorized use or disclosure is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Configuring and using cgi scripts in Tomcat
Howdy, There's more than uncommenting involved. You have to follow all the instructions in those comments, including the jar file rename and tomcat restart. Then you have to give us much more information about what errors you're seeing. Yoav Shapira Millennium ChemInformatics -Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 12:45 PM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat I've read those comments and uncommented the lines specified but when I try to run the script it gives me that it is not available. Allen -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 7:55 AM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat Howdy, Read the comments for the CGI servlet in $CATALINA_HOME/conf/web.xml. Yoav Shapira Millennium ChemInformatics -Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Monday, September 22, 2003 5:06 PM To: Tomcat Users List Subject: Configuring and using cgi scripts in Tomcat Hello... I am trying to configure Tomcat to run a perl script that is part of an application I am moving over from another server. Since this is one script I do not want to rewrite it so I thought that I could set the server to run CGI scripts. I have put the entries in the web.xml file and restarted the server but I cannot get the script to run. Has anyone had any success in doing this? Allen This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Configuring and using cgi scripts in Tomcat
Okay I did all that 1 - Uncommented the lines for the servlet container 2 - Uncommented the lines for the servlet-mapping 3 - renamed the servlets-cgi.renametojar file to servlets-cgi.jar Here are those listings: servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-nameclientInputTimeout/param-name param-value100/param-value /init-param init-param param-namedebug/param-name param-value6/param-value /init-param init-param param-namecgiPathPrefix/param-name param-valueWEB-INF/cgi-bin/param-value /init-param /servlet servlet-mapping servlet-namecgi/servlet-name url-pattern/cgi-bin/*/url-pattern /servlet-mapping When I places a cgi script out there to just show a statement, I get the following error HTTP Status 404 - /resporta/cgi-bin/animal.cgi type Status report message /resporta/cgi-bin/animal.cgi description The requested resource (/resporta/cgi-bin/animal.cgi) is not available. Apache Tomcat/4.1.18 -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 11:47 AM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat Howdy, There's more than uncommenting involved. You have to follow all the instructions in those comments, including the jar file rename and tomcat restart. Then you have to give us much more information about what errors you're seeing. Yoav Shapira Millennium ChemInformatics -Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 12:45 PM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat I've read those comments and uncommented the lines specified but when I try to run the script it gives me that it is not available. Allen -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 7:55 AM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat Howdy, Read the comments for the CGI servlet in $CATALINA_HOME/conf/web.xml. Yoav Shapira Millennium ChemInformatics -Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Monday, September 22, 2003 5:06 PM To: Tomcat Users List Subject: Configuring and using cgi scripts in Tomcat Hello... I am trying to configure Tomcat to run a perl script that is part of an application I am moving over from another server. Since this is one script I do not want to rewrite it so I thought that I could set the server to run CGI scripts. I have put the entries in the web.xml file and restarted the server but I cannot get the script to run. Has anyone had any success in doing this? Allen This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message may contain proprietary or confidential company information. Any unauthorized use or disclosure is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configuring and using cgi scripts in Tomcat
/resporta/cgi-bin/animal.cgi does not map to /cgi-bin/* I'm guessing resporta is the name of your webapp? Where did you place the script? As I read it, you need to put it in /ROOT/WEB-INF/cgi (I could be wrong). HTH, Jon Wilson, Allen wrote: Okay I did all that 1 - Uncommented the lines for the servlet container 2 - Uncommented the lines for the servlet-mapping 3 - renamed the servlets-cgi.renametojar file to servlets-cgi.jar Here are those listings: servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-nameclientInputTimeout/param-name param-value100/param-value /init-param init-param param-namedebug/param-name param-value6/param-value /init-param init-param param-namecgiPathPrefix/param-name param-valueWEB-INF/cgi-bin/param-value /init-param /servlet servlet-mapping servlet-namecgi/servlet-name url-pattern/cgi-bin/*/url-pattern /servlet-mapping When I places a cgi script out there to just show a statement, I get the following error HTTP Status 404 - /resporta/cgi-bin/animal.cgi type Status report message /resporta/cgi-bin/animal.cgi description The requested resource (/resporta/cgi-bin/animal.cgi) is not available. Apache Tomcat/4.1.18 -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 11:47 AM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat Howdy, There's more than uncommenting involved. You have to follow all the instructions in those comments, including the jar file rename and tomcat restart. Then you have to give us much more information about what errors you're seeing. Yoav Shapira Millennium ChemInformatics - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Configuring and using cgi scripts in Tomcat
You mean /ROOT/WEB-INF/cgi-bin... And that is what I thought but when I made a directory at that position. I still was not able to get to the script. Allen -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 12:47 PM To: Tomcat Users List Subject: Re: Configuring and using cgi scripts in Tomcat /resporta/cgi-bin/animal.cgi does not map to /cgi-bin/* I'm guessing resporta is the name of your webapp? Where did you place the script? As I read it, you need to put it in /ROOT/WEB-INF/cgi (I could be wrong). HTH, Jon Wilson, Allen wrote: Okay I did all that 1 - Uncommented the lines for the servlet container 2 - Uncommented the lines for the servlet-mapping 3 - renamed the servlets-cgi.renametojar file to servlets-cgi.jar Here are those listings: servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-nameclientInputTimeout/param-name param-value100/param-value /init-param init-param param-namedebug/param-name param-value6/param-value /init-param init-param param-namecgiPathPrefix/param-name param-valueWEB-INF/cgi-bin/param-value /init-param /servlet servlet-mapping servlet-namecgi/servlet-name url-pattern/cgi-bin/*/url-pattern /servlet-mapping When I places a cgi script out there to just show a statement, I get the following error HTTP Status 404 - /resporta/cgi-bin/animal.cgi type Status report message /resporta/cgi-bin/animal.cgi description The requested resource (/resporta/cgi-bin/animal.cgi) is not available. Apache Tomcat/4.1.18 -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 11:47 AM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat Howdy, There's more than uncommenting involved. You have to follow all the instructions in those comments, including the jar file rename and tomcat restart. Then you have to give us much more information about what errors you're seeing. Yoav Shapira Millennium ChemInformatics - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message may contain proprietary or confidential company information. Any unauthorized use or disclosure is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Configuring and using cgi scripts in Tomcat
Okay... I think I have the mapping correct because it now finds the file but tries to download it. I am trying to add a listing to the mime type so that it will process the file as a script. I added the following entry to the mime types mappings list mime-mapping extensioncgi/extension mime-typeapplication/x-httpd-cgi/mime-type /mime-mapping But it stills tries to download the file. Does anyone know of another mime list for CGI Scripts Allen -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 12:47 PM To: Tomcat Users List Subject: Re: Configuring and using cgi scripts in Tomcat /resporta/cgi-bin/animal.cgi does not map to /cgi-bin/* I'm guessing resporta is the name of your webapp? Where did you place the script? As I read it, you need to put it in /ROOT/WEB-INF/cgi (I could be wrong). HTH, Jon Wilson, Allen wrote: Okay I did all that 1 - Uncommented the lines for the servlet container 2 - Uncommented the lines for the servlet-mapping 3 - renamed the servlets-cgi.renametojar file to servlets-cgi.jar Here are those listings: servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-nameclientInputTimeout/param-name param-value100/param-value /init-param init-param param-namedebug/param-name param-value6/param-value /init-param init-param param-namecgiPathPrefix/param-name param-valueWEB-INF/cgi-bin/param-value /init-param /servlet servlet-mapping servlet-namecgi/servlet-name url-pattern/cgi-bin/*/url-pattern /servlet-mapping When I places a cgi script out there to just show a statement, I get the following error HTTP Status 404 - /resporta/cgi-bin/animal.cgi type Status report message /resporta/cgi-bin/animal.cgi description The requested resource (/resporta/cgi-bin/animal.cgi) is not available. Apache Tomcat/4.1.18 -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 11:47 AM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat Howdy, There's more than uncommenting involved. You have to follow all the instructions in those comments, including the jar file rename and tomcat restart. Then you have to give us much more information about what errors you're seeing. Yoav Shapira Millennium ChemInformatics - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message may contain proprietary or confidential company information. Any unauthorized use or disclosure is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Configuring and using cgi scripts in Tomcat
) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(Compiled Code) at org.apache.catalina.core.StandardContext.invoke(Compiled Code) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(Compiled Code) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa lve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(Compiled Code) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(Compiled Code) at org.apache.catalina.valves.AccessLogValve.invoke(Compiled Code) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Compiled Code) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(Http11Protocol.java:386) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Compiled Code) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Compiled Code) at java.lang.Thread.run(Thread.java:479) Apache Tomcat/4.1.18 -Original Message- From: Wilson, Allen Sent: Tuesday, September 23, 2003 3:35 PM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat Okay... I think I have the mapping correct because it now finds the file but tries to download it. I am trying to add a listing to the mime type so that it will process the file as a script. I added the following entry to the mime types mappings list mime-mapping extensioncgi/extension mime-typeapplication/x-httpd-cgi/mime-type /mime-mapping But it stills tries to download the file. Does anyone know of another mime list for CGI Scripts Allen -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 12:47 PM To: Tomcat Users List Subject: Re: Configuring and using cgi scripts in Tomcat /resporta/cgi-bin/animal.cgi does not map to /cgi-bin/* I'm guessing resporta is the name of your webapp? Where did you place the script? As I read it, you need to put it in /ROOT/WEB-INF/cgi (I could be wrong). HTH, Jon Wilson, Allen wrote: Okay I did all that 1 - Uncommented the lines for the servlet container 2 - Uncommented the lines for the servlet-mapping 3 - renamed the servlets-cgi.renametojar file to servlets-cgi.jar Here are those listings: servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-nameclientInputTimeout/param-name param-value100/param-value /init-param init-param param-namedebug/param-name param-value6/param-value /init-param init-param param-namecgiPathPrefix/param-name param-valueWEB-INF/cgi-bin/param-value /init-param /servlet servlet-mapping servlet-namecgi/servlet-name url-pattern/cgi-bin/*/url-pattern /servlet-mapping When I places a cgi script out there to just show a statement, I get the following error HTTP Status 404 - /resporta/cgi-bin/animal.cgi type Status report message /resporta/cgi-bin/animal.cgi description The requested resource (/resporta/cgi-bin/animal.cgi) is not available. Apache Tomcat/4.1.18 -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 11:47 AM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat Howdy, There's more than uncommenting involved. You have to follow all the instructions in those comments, including the jar file rename and tomcat restart. Then you have to give us much more
RE: Configuring and using cgi scripts in Tomcat
In the stack trace, root cause, you'll find: java.lang.NoSuchMethodError: java.lang.Runtime: method exec(Ljava/lang/String;[Ljava/lang/String;Ljava/io/File;)Ljava/lang/Proc ess; not found So something (org.apache.catalina.servlets.CGIServlet$CGIRunner.run) is trying to find a method called: java.langRuntime.exec(String, String[] File) But cannot find it. There is such a method, but only since JDK 1.3 So.. are you running at least 1.3? -Original Message- From: Wilson, Allen [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 5:22 PM To: Tomcat Users List Subject: RE: Configuring and using cgi scripts in Tomcat Okay... Found out that I did not have the mapping correct but when I changed it to go the ROOT/WEB-INF/cgi-bin. I have now getting the following error. Any help would be highly appreciate (even to the point of naming my next born after you.:-) ) Allen (error msg) HTTP Status 500 - -- -- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at javax.servlet.ServletException.(ServletException.java:132) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Applica tionFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValv e.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(Compiled Code) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValv e.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(Compiled Code) at org.apache.catalina.core.StandardContext.invoke(Compiled Code) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java :180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi spatcherVa lve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java :172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.valves.AccessLogValve.invoke(Compiled Code) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEn gineValve. java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(Compiled Code) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter. java:223) at org.apache.coyote.http11.Http11Processor.process(Compiled Code) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle r.processC onnection(Http11Protocol.java:386) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Compiled Code) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Compiled Code) at java.lang.Thread.run(Thread.java:479) root cause java.lang.NoSuchMethodError: java.lang.Runtime: method exec(Ljava/lang/String;[Ljava/lang/String;Ljava/io/File;)Ljava /lang/Proc ess; not found at org.apache.catalina.servlets.CGIServlet$CGIRunner.run(Compiled Code) 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
Configuring and using cgi scripts in Tomcat
Hello... I am trying to configure Tomcat to run a perl script that is part of an application I am moving over from another server. Since this is one script I do not want to rewrite it so I thought that I could set the server to run CGI scripts. I have put the entries in the web.xml file and restarted the server but I cannot get the script to run. Has anyone had any success in doing this? Allen This message may contain proprietary or confidential company information. Any unauthorized use or disclosure is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
CGI scripts
Hi can i run cgi scripts too through apache if yes then how and where to place them ? -- harsh http://www.cse.iitb.ac.in/~harsh -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CGI scripts
Hi, I don't know if this is too simple an answer to your question but it is similar to what I have been trying to do and I have discovered that they can be referenced in the all the same ways as a normal http address, e.g. anchors, etc. (e.g. http://localhost/directory/cgiscriptname. If you need something more complicated then look at URLConnection and HttpURLConnection. You effectively simulate a servlet GET request by opening an input stream on the connection but you may need to use URLEncode for the parameters. Regards, Susan Hoddinott http://www.hexworx.com - Original Message - From: harsh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 07, 2003 4:02 PM Subject: CGI scripts Hi can i run cgi scripts too through apache if yes then how and where to place them ? -- harsh http://www.cse.iitb.ac.in/~harsh -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Executing CGI scripts using Tomcat 3.2.3
I am running Tomcat 3.2.3 and would like to know how to get cgi scripts to work. If cgi scripts don't work under 3.2.3 what release should I use? Regards, Mark
Executing CGI scripts
I am running Tomcat 3.2.3 and need to know how to call a cgi script. I don't have problems running under apache. Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Can tomcat 3.3 run cgi scripts
Hi, I see that Tomcat 4.0 has CGIServlet. At the moment I'm stuck on tomcat 3.3. Is there a way to configure it to run CGI scripts? Thanks for any help. Michael Kajen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tomcat running CGI scripts!!
Hi everyone, I have a dilemna, that I would like to know if there is a solution. We have Apache and Tomcat configured and is up and running a java application. We have mounted the entire / to tomcat so every request essentially goes to him. This setup was for application reasons, and cannot be changed without major changes to the application. Now we never had a reason to run cgi scripts on this server, but now we do, and hence the problem. When we place a perl script in /usr/local/apache/cgi-bin/ Everything works when the Apache is running by itself with the Tomcat include file commented out, but when Apache has the include file with tomcat running. The cgi-bin scripts fail, they just print out the text files. I am desperate need of a solution that will have the following outcome, Apache and Tomcat running, with Tomcat mounting the entire Apache tree, and also the ability to place cgi scripts in a directory that will be run either through Tomcat some kind of way, or through Apache directly, it doesn't matter how they are run, as long as they can run. Any advice, and configuration tips will be greatly helpful. And also remember, the Tomcat must maintain the entire Apache tree. Config file for Tomcat looks like this. ### # Apache JServ Configuration File # ### # Note: this file should be appended or included into your httpd.conf # Tell Apache on win32 to load the Apache JServ communication module # LoadModule jserv_module modules/ApacheModuleJServ.dll # Tell Apache on Unix to load the Apache JServ communication module # For shared object builds only!!! # @LOAD_OR_NOT@LoadModule jserv_module @LIBEXECDIR@/mod_jserv.so LoadModule jserv_module libexec/mod_jserv.so IfModule mod_jserv.c # Do not edit! ApJServManual on ApJServDefaultProtocol ajpv12 ApJServSecretKey DISABLED ApJServMountCopy on ApJServLogLevel debug ### Change if you run tomcat on a different host #ApJServDefaultHost localhost ApJServDefaultPort 8007 All jsp files will go to tomcat ApJServMount default /root AddType text/jsp .jsp AddHandler jserv-servlet .jsp ## Context mapping - all requests go to tomcat ApJServMount / /root ## Context mapping - you need to deploy # ( copy or ln -s ) the context into htdocs ## # ApJservMount /CONTEXT/servlet /root # Location /CONTEXT/WEB-INF/ # AllowOverride None # Allow from all # /Location Location /control AuthType Basic AuthName For internal users only AuthUserFile /usr/local/apache/users AuthType Basic Limit GET POST require user webodigo /Limit /Location /IfModule Thanks in advance = Corey M. Ellis Network Administrator 11 Broadway, Suite 365, New York, NY 10004 [EMAIL PROTECTED] Phone: 212.809.2002 x:16 Fax: 212.809.2092 Mobile: 917.868.8535 Odigo: 279170 Odigo. Communication Redefined. www.odigo.com
Re: Tomcat running CGI scripts!!
Just read http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-apache-howto.html. In Making Apache Serve your Context's Static Files you find a sample configuration that can help you. In your configuration every request is served by tomcat (ApJServMount / /root) and here only static files are served by tomcat. Bye, Peter. -- Mag. Peter Hrastnik tele.ring Telekom Service GmbH A-1030 Wien, Hainburgerstr. 33 Tel.: +43/1/931012/3277, Mobil: +43/650/6503277 Corey M. Ellis wrote: Hi everyone, I have a dilemna, that I would like to know if there is a solution. We have Apache and Tomcat configured and is up and running a java application. We have mounted the entire / to tomcat so every request essentially goes to him. This setup was for application reasons, and cannot be changed without major changes to the application. Now we never had a reason to run cgi scripts on this server, but now we do, and hence the problem. When we place a perl script in /usr/local/apache/cgi-bin/ Everything works when the Apache is running by itself with the Tomcat include file commented out, but when Apache has the include file with tomcat running. The cgi-bin scripts fail, they just print out the text files. I am desperate need of a solution that will have the following outcome, Apache and Tomcat running, with Tomcat mounting the entire Apache tree, and also the ability to place cgi scripts in a directory that will be run either through Tomcat some kind of way, or through Apache directly, it doesn't matter how they are run, as long as they can run. Any advice, and configuration tips will be greatly helpful. And also remember, the Tomcat must maintain the entire Apache tree. Config file for Tomcat looks like this. ### # Apache JServ Configuration File # ### # Note: this file should be appended or included into your httpd.conf # Tell Apache on win32 to load the Apache JServ communication module # LoadModule jserv_module modules/ApacheModuleJServ.dll # Tell Apache on Unix to load the Apache JServ communication module # For shared object builds only!!! # @LOAD_OR_NOT@LoadModule jserv_module @LIBEXECDIR@/mod_jserv.so LoadModule jserv_module libexec/mod_jserv.so IfModule mod_jserv.c # Do not edit! ApJServManual on ApJServDefaultProtocol ajpv12 ApJServSecretKey DISABLED ApJServMountCopy on ApJServLogLevel debug ### Change if you run tomcat on a different host #ApJServDefaultHost localhost ApJServDefaultPort 8007 All jsp files will go to tomcat ApJServMount default /root AddType text/jsp .jsp AddHandler jserv-servlet .jsp ## Context mapping - all requests go to tomcat ApJServMount / /root ## Context mapping - you need to deploy # ( copy or ln -s ) the context into htdocs ## # ApJservMount /CONTEXT/servlet /root # Location /CONTEXT/WEB-INF/ # AllowOverride None # Allow from all # /Location Location /control AuthType Basic AuthName For internal users only AuthUserFile /usr/local/apache/users AuthType Basic Limit GET POST require user webodigo /Limit /Location /IfModule Thanks in advance = Corey M. Ellis Network Administrator 11 Broadway, Suite 365, New York, NY 10004 [EMAIL PROTECTED] Phone: 212.809.2002 x:16 Fax: 212.809.2092 Mobile: 917.868.8535 Odigo: 279170 Odigo. Communication Redefined. www.odigo.com