tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wilson, Allen" <Allen.Wil...@marcresearch.com>
Subject RE: Configuring and using cgi scripts in Tomcat
Date Wed, 24 Sep 2003 16:06:18 GMT
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:gb_dev@gb-im.com] 
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:Allen.Wilson@marcresearch.com] 
> 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:gb_dev@gb-im.com] 
> 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:Allen.Wilson@marcresearch.com]
> > 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:gb_dev@gb-im.com] 
> > 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:Allen.Wilson@marcresearch.com]
> > > 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)
> > > 	at 
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> > > er(Applica
> > > tionFilterChain.java:247)
> > > 	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)
> > > 
> > > 
> > > 
> > > --------------------------------------------------------------
> > > ----------
> > > --------
> > > 
> > > 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>
> > >         <extension>cgi</extension>
> > >         <mime-type>application/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:jon.wingfield@mkodo.com]
> > > 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-name>cgi</servlet-name>
> > > >  
> > > > 
> > > 
> > 
> <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
> > > >         <init-param>
> > > >           <param-name>clientInputTimeout</param-name>
> > > >           <param-value>100</param-value>
> > > >         </init-param>
> > > >         <init-param>
> > > >           <param-name>debug</param-name>
> > > >           <param-value>6</param-value>
> > > >         </init-param>
> > > >         <init-param>
> > > >           <param-name>cgiPathPrefix</param-name>
> > > >           <param-value>WEB-INF/cgi-bin</param-value>
> > > >         </init-param>
> > > >     </servlet>
> > > > 
> > > > 
> > > >     <servlet-mapping>
> > > >         <servlet-name>cgi</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:Yoav.Shapira@mpi.com]
> > > > 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: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: 
> tomcat-user-help@jakarta.apache.org
> > > 
> > > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message