Originally posted by michael tall:
I changed the code. It threw following exception: ClassNotFoundException com.microsoft.sqlserver.jdbc.SQLServerDriver
Same thing worked in a non-servlet class
Now its a search path issue. You are using a third party driver whose class files cannot be located in the search path. Its a bit different when it comes to web applications.
If you have a jar file of the driver, put it in your WEB-INF/lib directory.
For
testing purpose, try using the JDBC-ODBC bridge driver.
Hope this helps
[Edit: fixed typing mistake]
[ November 05, 2008: Message edited by: Amit Ghorpade ]