wood burning stoves*
The moose likes JSP and the fly likes question about servlet in tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

question about servlet in tomcat

zb cong
Ranch Hand

Joined: Jan 14, 2002
Posts: 416
i have install the jdbc driver for sqlserver2000 under the "c:\jdbc" directory,and set the classpath to point to all of three jar files under it,the programs with "main" entry that access sqlserver works well,but the servlet that access database don't work,and it tell me "no suitable driver",then i move the jar files to "TOMCAT-HOME\lib",the servlet works well,i know that the files under the lib directory will be loaded when the tomcat start,but why the servlet can't identify the classpath with absolute path?
otherwise,i learn that some jsp server such as jrun can config the servlet-chain,if the tomcat too?
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

but why the servlet can't identify the classpath with absolute path?

Thats because Tomcat sets its own CLASSPATH and doesn't use the env CLASSPATH or the user defined CLASSPATH.
When Tomcat starts up, it echos' the CLASSPATH. You might verify that CLASSPATH to see if your drivers, in your absolute path, are in that CLASSPATH or not.
And BTW, yes you can tweak the setup scripts of Tomcat, but I personally, don't do it unless it is absolutely essential.
regds.
- satya


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
zb,
Do not cross post the same question in multiple forums.
 
GeeCON Prague 2014
 
subject: question about servlet in tomcat