File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Tomcat CGI & Database Connectivity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat CGI & Database Connectivity" Watch "Tomcat CGI & Database Connectivity" New topic

Tomcat CGI & Database Connectivity

anand pai

Joined: Jan 22, 2009
Posts: 1
I am trying to connect to a mysql database using a cgi program(perl program) through tomcat.

But I am getting an error like 'could not connect to localhost:3306 \tcp:IO::Socket::INET:Bad protocol tcp'.

I was able to run the cgi program (perl) from command prompt also i could run a different perl program without database connectivity statement through tomcat.

So the problem is like i cannot connect to database through cgi when run with tomcat.

Can someone please help me .... and i want 2 run it through tomcat itself not using apache httpd or anything.

Thanks in advance
I agree. Here's the link:
subject: Tomcat CGI & Database Connectivity
It's not a secret anymore!