Hi,
I'm trying to retrieve data from MS access database through Java Servlet. I used the exact code given in the article "Displaying records from the Database with Java Servlets". I'm using Tomcat server and JDBC:ODBC Driver to establish the connection to MS Access. The DisplayServlet is working fine but when I click on "Display button" in the form I'm getting the following Exception. Can someone help me on this?
This is the url I'm using and server is runnning in my local machine..
http://localhost:8080/servlet/com.stardeveloper.servlets.db.DisplayServlet
Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet Could not display records.
at com.stardeveloper.servlets.db.DisplayServlet.doPost(DisplayServlet.java:82)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6026)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6183)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:2453)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:315)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:158)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:194)
at com.stardeveloper.servlets.db.DisplayServlet.doPost(DisplayServlet.java:63)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
Thanks.