tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <j...@kewlstuff.co.za>
Subject Re: How to do CGI programming in Tomcat5.5
Date Tue, 22 Jul 2008 15:48:11 GMT

----- Original Message ----- 
From: "suman" <sumankumar.pramanik@gmail.com>
To: <users@tomcat.apache.org>
Sent: Tuesday, July 22, 2008 12:32 PM
Subject: How to do CGI programming in Tomcat5.5


> Gi,
> Can you please point me to a link where it clearly says in step by step 
> way
> how to do cgi programming with tomcat5.5 with some examples.
> The Documentation of tomcat 5.5 is not that much helpful, very brief 
> without
> any examples.
>
> Also I am unable to make cgi-servlet up. I tried the steps mentioned in
> apache 5.5 documentation.
> Can anyone please tell me if CGI server is must to be deployed to do CGI
> programming?
> If you need error messages, I'll give you.
>
> Thank you.
> -suman

If you google for Perl Tomcat... you'll get lucky...

I tried it for fun in NetBeans....

Create a new web project...

In the web.xml file add this...

    <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>
         <load-on-startup>5</load-on-startup>
    </servlet>

    <servlet-mapping>
       <servlet-name>cgi</servlet-name>
       <url-pattern>/cgi-bin/*</url-pattern>
    </servlet-mapping>

Under the web-inf folder create /cgi folder

Go to where Tomcat is installed...
under server/lib

find

servlets-ssi.renametojar
and
servlets-cgi.renametojar

do that make em .jar

You in business... but thats where I stopped ;)
You need to get perl and install it on the machine... I imagine it must be 
in the path

And find yourself some perl script...

TC help http://tomcat.apache.org/tomcat-5.5-doc/cgi-howto.html
describes the same thing...

Have fun.... then get into servlets asap ;)

---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------







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


Mime
View raw message