tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Calling a CGI script from Servlet
Date Sun, 01 Aug 2010 14:07:45 GMT
On 01/08/2010 13:19, troylparrish@aol.com wrote:
> 
> 
> 
> Mark,
> 
> Thanks for the reply. I am using Tomcat 6.0.20.  The script is located in WEB-INF/cgi
and in the call I am using an absolute path:
> 
> //System Call
> String[cmd] = {"python", 'home/troy/NetBeansProjects/GSMFilter/web/WEB-INF/cgi/helloWorld.py",
"-c"};
> Runtime rt = Runtime.getRuntime();
> Process proc = rt.exec(cmd);
> int exitVal = proc.waitFor();
> 
> //Write exit value to file - Get value of zero
> toFile.write("" + exitVal);

This is nothing to do with Tomcat's CGI servlet - you aren't using it.
However, you might want to look at the source code for Tomcat's CGI
Servlet - it might give you some pointers as to why your code isn't working.

Mark



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


Mime
View raw message