The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > UNIX Desktop for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-27-2009
Preeti_t Preeti_t is offline
Registered User
  
 

Join Date: May 2009
Posts: 2
CGI execution problem on Unix

Hello everyone,

I have developed a cgi application on windows. i have created a folder in webapps of tomcat, within that a WEB-INF folder and in that cgi folder.
This cgi folder contains one executable. The web.xml is as follows:
Code:
<servlet>
        <servlet-name>cgi</servlet-name>
        <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
        <init-param>
          <param-name>debug</param-name>
          <param-value>0</param-value>
        </init-param>
        <init-param>
          <param-name>cgiPathPrefix</param-name>
          <param-value>WEB-INF/cgi</param-value>
        </init-param>
         <init-param>
		   <param-name>passShellEnvironment</param-name>
		   <param-value>true</param-value>
	    </init-param>
        <init-param>
		  <param-name>executable</param-name>
		  <param-value>cmd /c</param-value>
	    </init-param>
        <load-on-startup>5</load-on-startup>
    </servlet>

	<servlet-mapping>
        <servlet-name>cgi</servlet-name>
        <url-pattern>/cgi-bin/*</url-pattern>
    </servlet-mapping>
now when i run this executable from the url it runs.
I want to do this same thing in unix but this is not working. for unix i have changed the above xml as follows:

Code:
           <init-param>
		  <param-name>executable</param-name>
		  <param-value>/bin/ksh -c</param-value>
	    </init-param>
the rest is same. Can someone plz help me wit dis????

Last edited by Yogesh Sawant; 05-27-2009 at 05:22 PM.. Reason: added code tags