Using a JSP to connect to a database is not so easy, it is normal to connect to SQL Server 2008 using pure Java, but always error classnotfoundexception when using JSP calls. Very depressed jar driver package that's the way it is.
- (x) CSDN blog A netizen said to change the driver and URL to 4.0 jar driver, or not, I even modified to 4.1 of the jar driver. also always error.
- (x) Online Netizen said to copy the Sqljdbc_auth.dll to C:\Windows\System32 , or not.
- (x) Then I thought it was the JDK version difference that would affect, I changed the JDK, or not.
- (x) then put the jar4.1 driver package under the Web under the Web-inf Lib, also not.
- (√) Finally put the driver package under the Jdk1.7.0_17\jre\lib\ext, if successful, csdn really experienced buddies.
After the test was successful, I removed the sqljdbc_auth.dll from the C:\Windows\System32 and removed the jar driver package from the Web-inf lib. and modify the jar4.1 as the normal jar package, the operation is normal.
Jsp-java.lang.classnotfoundexception:com.microsoft.sqlserver.jdbc.sqlserverdriver