Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 28754 invoked from network); 16 Nov 2000 22:02:03 -0000 Received: from natty.paycom.net (208.236.105.27) by locus.apache.org with SMTP; 16 Nov 2000 22:02:03 -0000 Received: mail@127.0.0.1 Sender: tonyk@natty.paycom.net Message-ID: <3A1459DD.AC0B75AC@paycom.net> Date: Thu, 16 Nov 2000 14:04:13 -0800 From: Tony Keith Organization: Paycom X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 To: tomcat-user@jakarta.apache.org Subject: Re: How to configure Mysql with Tomcat. (problem Fixed!) References: <974403351.3a1437179d2bf@web2.mailspace.com> <3A143FBE.BC921097@paycom.net> Content-Type: multipart/alternative; boundary="------------1C22C260A3EEB864FB5EF4C2" X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N --------------1C22C260A3EEB864FB5EF4C2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Tony Keith wrote: Once I copied the Mysql classes to the /WEB-INF/classes directory it worked. I also was specifying the wrong path for the driver. I had org.mm.mysql.Driver instead of org.gjt.mm.mysql.Driver. Thanks for everyone's help. > Noel Morgan wrote: > >> For Tomcat 3.2b6 I used: >> >> my setup: >> Apache 1.3.12 >> RH 6.2 Linux 2.2.14-5.0 >> >> Class.forName("org.gjt.mm.mysql.Driver").newInstance(); >> con = >> Drive >> Manager.getConnection("jdbc:mysql://localhost:3306/DatabaseName?user=dbuser&password=dbpassword"); >> >> put the jdbc drivers in the classes folder of your >> app like: >> >> cp -Rf $JDBC_HOME/org $MYAPP_HOME/WEB-INF/classes >> > > I tried this but I still get the same error... > Is there any other configuration to the web.xml? > >> >> That should do it, but I have noticed serious >> performance degradation in switching from JServ >> 1.1.2 to Tomcat 3.2b6. I am not sure if I am missing >> something in the docs, but JServ 1.1.2/GNUJsp 1.0 is >> IMHO much faster (at least with the mm.mysql JDBC >> driver apps I have written) If someone could point >> me to some tuning tips/parameters I may have missed >> in the standard docs I would really appreciate it. >> >> Noel >> >> ----- Original Message ----- >> >From : Zebadiah Kimmel >> Sent : Thu, 16 Nov 2000 13:49:07 -0500 >> To : >> tomcat-user@jakarta.apache.org,tonyk@paycom.net >> Subject : Re: How to configure Mysql with Tomcat. >> >> The following code should work if your database's >> rootpassword is empty: >> Class.forName(dbDriver).newInstance(); >> connPool[i]=DriverManager.getConnectio >> ("jdbc:mysql://"+dbServer+"?user="+db >> Login); >> >> As for connecting with a non-empty password, I >> don'tknow how to do that. >> If you figure it out, please let me know. >> >> --Zeba >> >> At 09:58 AM 11/16/00 -0800, Tony Keith wrote: >> >Hello, >> > >> >I wrote a simple servlet to insert a row into a >> mysqldatabase table. >> >I'm running Tomcat >> > >> >What are the steps to configure Tomcat to work >> withthis servlet? >> >The problem I'm having now is the driver isn't >> found. >> > >> >Where do I place the driver? In the lib directory? >> > >> >How do I reference a new instance of the driver? >> >This is how I reference it now: >> >Class.forName("org.mm.mysql.Driver").newInstance(); >> > >> >Will the connection information remain the same? >> >Here is the connection information I currently use: >> >con >> =DriverManager.getConnection("jdbc:mysql://localhost/webdata", >> >"user", "password"); >> > >> >TIA >> >-- >> >Tony Keith >> >> __________________________________________________ >> Move your email to a better address. >> Over 1,000 domains to choose from! FREE! PRIVATE! >> http://www.MailSpace.com >> >> > > -- > Tony Keith > Director of Information Technology > Paycom.net > 4215 Glencoe Avenue, First Floor > Marina Del Rey, CA 90292 > TEL: (310) 827-5880 ext. 304 > FAX: (310) 827-5519 > > -- Tony Keith Director of Information Technology Paycom.net 4215 Glencoe Avenue, First Floor Marina Del Rey, CA 90292 TEL: (310) 827-5880 ext. 304 FAX: (310) 827-5519 --------------1C22C260A3EEB864FB5EF4C2 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Tony Keith wrote:

Once I copied the Mysql classes to the /WEB-INF/classes directory it worked.
I also was specifying the wrong path for the driver.
I had org.mm.mysql.Driver instead of org.gjt.mm.mysql.Driver.

Thanks for everyone's help.

Noel Morgan wrote:
For Tomcat 3.2b6 I used:

my setup:
Apache 1.3.12
RH 6.2 Linux 2.2.14-5.0

Class.forName("org.gjt.mm.mysql.Driver").newInstance();
con =
DriverManager.getConnection("jdbc:mysql://localhost:3306/DatabaseName?user=dbuser&password=dbpassword");

put the jdbc drivers in the classes folder of your
app like:

cp -Rf $JDBC_HOME/org $MYAPP_HOME/WEB-INF/classes
 

I tried this but I still get the same error...
Is there any other configuration to the web.xml?
 
That should do it, but I have noticed serious
performance degradation in switching from JServ
1.1.2 to Tomcat 3.2b6. I am not sure if I am missing
something in the docs, but JServ 1.1.2/GNUJsp 1.0 is
IMHO much faster (at least with the mm.mysql JDBC
driver apps I have written) If someone could point
me to some tuning tips/parameters I may have missed
in the standard docs I would really appreciate it.

Noel

----- Original Message -----
>From    : Zebadiah Kimmel <zkimmel@zebware.com>
Sent    : Thu, 16 Nov 2000 13:49:07 -0500
To      :
tomcat-user@jakarta.apache.org,tonyk@paycom.net
Subject : Re: How to configure Mysql with Tomcat.

The following code should work if your database's
rootpassword is empty:
Class.forName(dbDriver).newInstance();
connPool[i]=DriverManager.getConnection("jdbc:mysql://"+dbServer+"?user="+db
Login);

As for connecting with a non-empty password, I
don'tknow how to do that.
If you figure it out, please let me know.

--Zeba

At 09:58 AM 11/16/00 -0800, Tony Keith wrote:
>Hello,
>
>I wrote a simple servlet to insert a row into a
mysqldatabase table.
>I'm running Tomcat
>
>What are the steps to configure Tomcat to work
withthis servlet?
>The problem I'm having now is the driver isn't
found.
>
>Where do I place the driver? In the lib directory?
>
>How do I reference a new instance of the driver?
>This is how I reference it now:
>Class.forName("org.mm.mysql.Driver").newInstance();
>
>Will the connection information remain the same?
>Here is the connection information I currently use:
>con
=DriverManager.getConnection("jdbc:mysql://localhost/webdata",
>"user", "password");
>
>TIA
>--
>Tony Keith

__________________________________________________
Move your email to a better address.
Over 1,000 domains to choose from! FREE! PRIVATE!
http://www.MailSpace.com
 
 

-- 
Tony Keith
Director of Information Technology
Paycom.net
4215 Glencoe Avenue, First Floor
Marina Del Rey, CA  90292
TEL: (310) 827-5880 ext. 304
FAX: (310) 827-5519
 
-- 
Tony Keith
Director of Information Technology
Paycom.net
4215 Glencoe Avenue, First Floor
Marina Del Rey, CA  90292
TEL: (310) 827-5880 ext. 304
FAX: (310) 827-5519
  --------------1C22C260A3EEB864FB5EF4C2--