• Post Reply Bookmark Topic Watch Topic
  • New Topic

question about servlet in tomcat  RSS feed

 
zb cong
Ranch Hand
Posts: 416
  • Mark post as helpful
  • send pies
  • Quote
  • 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?
 
Joe Gilvary
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the Tomcat documentation.
Tomcat 4 /Catalina

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html
Tomcat 3.2
http://jakarta.apache.org/tomcat/tomcat-3.2-doc/uguide/tomcat_ug.html
Pay special attention to the description of the
System class loader for Tomcat 4. Essentially, the
start up scripts for Tomcat that come with Tomcat
ignore the system classpath.
In both 3.2 and 4.0, the lib directory is the
place to put classes / jars which you want
available to all web applications.
HTH,
Joe
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!