Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 87032 invoked from network); 1 Aug 2010 14:08:34 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Aug 2010 14:08:34 -0000 Received: (qmail 82036 invoked by uid 500); 1 Aug 2010 14:08:30 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 81730 invoked by uid 500); 1 Aug 2010 14:08:28 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 81721 invoked by uid 99); 1 Aug 2010 14:08:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Aug 2010 14:08:27 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [193.252.22.128] (HELO smtp5.freeserve.com) (193.252.22.128) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Aug 2010 14:08:19 +0000 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf3419.me.freeserve.com (SMTP Server) with ESMTP id BE41A1C00081 for ; Sun, 1 Aug 2010 16:07:58 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf3419.me.freeserve.com (SMTP Server) with ESMTP id AF5B21C00085 for ; Sun, 1 Aug 2010 16:07:58 +0200 (CEST) Received: from mail.homeinbox.net (unknown [91.109.166.185]) by mwinf3419.me.freeserve.com (SMTP Server) with ESMTP id 8806D1C00081 for ; Sun, 1 Aug 2010 16:07:58 +0200 (CEST) X-ME-UUID: 20100801140758557.8806D1C00081@mwinf3419.me.freeserve.com Received: from localhost (localhost [127.0.0.1]) by mail.homeinbox.net (Postfix) with ESMTP id 4793D32F88 for ; Sun, 1 Aug 2010 15:08:18 +0100 (BST) X-Virus-Scanned: Debian amavisd-new at homeinbox.net Received: from mail.homeinbox.net ([127.0.0.1]) by localhost (mail.homeinbox.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iIa+NULaNyl1 for ; Sun, 1 Aug 2010 15:08:13 +0100 (BST) Received: from [192.168.0.9] (study03.dev.local [192.168.0.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.homeinbox.net (Postfix) with ESMTPSA id EF9B532F82 for ; Sun, 1 Aug 2010 15:08:12 +0100 (BST) Message-ID: <4C557FB1.1090500@apache.org> Date: Sun, 01 Aug 2010 15:07:45 +0100 From: Mark Thomas User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-GB; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Calling a CGI script from Servlet References: <4C553963.5040909@apache.org> <8CCFF8ADCA0FBC9-1F40-1818A@Webmail-m104.sysops.aol.com> In-Reply-To: <8CCFF8ADCA0FBC9-1F40-1818A@Webmail-m104.sysops.aol.com> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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