Bookmark Topic Watch Topic
  • New Topic

question about servlet in tomcat

 
zb cong
Ranch Hand
Posts: 416
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 5040
  • Mark post as helpful
  • send pies
  • Report post to moderator

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
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Report post to moderator
zb,
Do not cross post the same question in multiple forums.
 
    Bookmark Topic Watch Topic
  • New Topic