This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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?
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