jdbc classpath problem

Hello all,

On my Rh6.2 box with apache and Jserv(for servlets) i put mm.jdbc driver for mysql to have connectivity from servlet to the mysql db.

I modified the files
/etc/rc.d/rc.local
/etc/rc.d/rc

and added within them
CLASSPATH=$CLASSPATH:/usr/local/java/mm.mysql.jdbc-2.0.1-bin.jar

After a system reboot if i give echo classpath i see that it shows the jar file in classpath but i still do not get database connectivity from servlet.

But if i upload the jdbc driver(jar files) into the domain.dom/servlet folder( Servlet folder being the repository)

I am able to connect fine to the database.

So for every site i have to upload the jdbc driver seperately into its servlet repository.

Why is this happening.

Am i correct in modifying the 2 files as above to add to the classpath. Or if there is some other way to add to classpath then let me try that if it works for me.
Mention the file name and path please. I am new to linux.

Regards
Manish Kapadia
Bombay-India



 

 

 

 

Top