R: what is needed to connect to mysql

2002-05-02 Thread Gianluca Gravina



 -Messaggio originale-
 Da: # Lalit Nagpal # [mailto:[EMAIL PROTECTED]] 
 Inviato: giovedì 2 maggio 2002 11.09
 A: [EMAIL PROTECTED]
 Oggetto: what is needed to connect to mysql
 
 
 
 hello,
 
 plz can anybody tell me how to connect to a mysql database 
 through a servlet. i know how to prepare a connection etc 
 through code but what other settings are needed. i am using 
 tomcat 4 as a standalone.
 
 The error i get is Class not found org.gjt.mm.mysql.Driver
 
 plz help ... 
 

Put your jdbc driver for mysql in your {webapp}/WEB-INF/lib/folder ...
It should work!

Bye, Grava



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: R: what is needed to connect to mysql

2002-05-02 Thread # Lalit Nagpal #


thanx man,
it works if u keep the extracted package
in the lib directory, and if u keep the 
jar file ... i wonder why it wont get
the necessary classes.
 


# Lalit Nagpal #


-
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness


Re: R: what is needed to connect to mysql

2002-05-02 Thread Jacob Kjome

Hello Gianluca,

Or use:

Thread.currentThread().getContextClassLoader().loadClass(dbDriver);

Instead of:

Class.forName(dbDriver);

The latter won't find the driver if it isn't immediately within the
same classloader as the class calling Class.forName where the first
one will find it in parent classloaders, so you can have the driver in
$TOMCAT_HOME/lib or $TOMCAT_HOME/common/lib...or WEB-INF/lib if you
still want to do that.

Jake

Thursday, May 02, 2002, 4:31:15 AM, you wrote:



 -Messaggio originale-
 Da: # Lalit Nagpal # [mailto:[EMAIL PROTECTED]] 
 Inviato: giovedì 2 maggio 2002 11.09
 A: [EMAIL PROTECTED]
 Oggetto: what is needed to connect to mysql
 
 
 
 hello,
 
 plz can anybody tell me how to connect to a mysql database 
 through a servlet. i know how to prepare a connection etc 
 through code but what other settings are needed. i am using 
 tomcat 4 as a standalone.
 
 The error i get is Class not found org.gjt.mm.mysql.Driver
 
 plz help ... 
 

GG Put your jdbc driver for mysql in your {webapp}/WEB-INF/lib/folder ...
GG It should work!

GG Bye, Grava



GG --
GG To unsubscribe:   mailto:[EMAIL PROTECTED]
GG For additional commands: mailto:[EMAIL PROTECTED]
GG Troubles with the list: mailto:[EMAIL PROTECTED]



-- 
Best regards,
 Jacobmailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]