You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by HARI17785 <ha...@wipro.com> on 2009/03/26 09:49:43 UTC

Tomcat 5.5 and Mysql 5.0 connectivity

Hi,
 i m using tomcat 5.5  and Mysql 5.0. I hav written a CGI script which
retrives some infn from database.Now i want to run my CGI script in
tomcat5.5 and queries the MySQL db.I m very much new to tomcat 5.5.So pls
somebody help me out.Do i need  any jar files for this connectivity?

Thanks,
Hari
-- 
View this message in context: http://www.nabble.com/Tomcat-5.5-and-Mysql-5.0-connectivity-tp22717981p22717981.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Tomcat 5.5 and Mysql 5.0 connectivity

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hari,

On 3/26/2009 4:49 AM, HARI17785 wrote:
>  i m using tomcat 5.5  and Mysql 5.0. I hav written a CGI script which
> retrives some infn from database.Now i want to run my CGI script in
> tomcat5.5 and queries the MySQL db.I m very much new to tomcat 5.5.So pls
> somebody help me out.Do i need  any jar files for this connectivity?

Sort of. Start here:

http://tomcat.apache.org/tomcat-5.5-doc/cgi-howto.html

There is also some information in $CATALINA_HOME/conf/web.xml near the
(commented-out) definition of CGIServlet.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAknM+McACgkQ9CaO5/Lv0PD7TwCeMoGUwUxZ3M7Cf1WUs57sys3R
4E0An3FdkOMMyCgZ3yQmuSrzfrsyTith
=NTKg
-----END PGP SIGNATURE-----

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


Re: Tomcat 5.5 and Mysql 5.0 connectivity

Posted by HARI17785 <ha...@wipro.com>.
Hi i got the solution,
 to connect ur cgi script from Apache to MySql db u hav to do the following
things.

1.Open ur Tomcat home directory and go to conf and open web.xml.
2.uncomment the following things..

         - <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>false</param-value> 
  </init-param>
  <load-on-startup>5</load-on-startup> 
  </servlet>
               
           and   change the <param-value>false</param-value> to
true(<param-value>true</param-value> )

           and change the <param-name>debug</param-name> 
  <param-value>0</param-value> value to 6


Uncomment the following

- <servlet-mapping>
  <servlet-name>cgi</servlet-name> 
  <url-pattern>/cgi-bin/*</url-pattern> if ur cgi bin name is cgi-bin dont
change this otherwise      give the exact name of ur cgi folder
  </servlet-mapping>

Now go to server\lib
there will be jar file named
servlets-cgi.renametojarservlets-cgi.renametojar change the name to
servlets-cgi.jar

Now ur CGI script will  work on .


Regards,
Hari17785







HARI17785 wrote:
> 
> Hi,
>  i m using tomcat 5.5  and Mysql 5.0. I hav written a CGI script which
> retrives some infn from database.Now i want to run my CGI script in
> tomcat5.5 and queries the MySQL db.I m very much new to tomcat 5.5.So pls
> somebody help me out.Do i need  any jar files for this connectivity?
> 
> Thanks,
> Hari
> 

-- 
View this message in context: http://www.nabble.com/Tomcat-5.5-and-Mysql-5.0-connectivity-tp22717981p22824933.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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