Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JSP Interest »

Newbie question about jdbc:odbc connection

Thomas Tsang

2004-12-02

Replies:

I am using apache + tomcat to do with my jsp project, and I do a jsp page
with following codes:
========
<%@(protected)" %>
<%@(protected).*" %>
<%@(protected)" %>
<%@(protected).*" %>
<%@(protected).*" %>
<%@(protected).*" %>
<%
java.sql.Connection connBooking;
java.sql.Statement sqlStmt;

connBooking = java.sql.DriverManager.getConnection
("jdbc:odbc:onlinebooking","username","password");
sqlStmt = connBooking.createStatement
(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE,java.sql.ResultSet.CONCUR_READ_O
NLY);
%>
=======
Then I create a ODBC source in System DNS with the name onlinebooking, this
source is connect to a remote SQL server, I have tested the connection in
ODBC interface and it can return ok.  However the following error is
returned when i load the above jsp page

=========
javax.servlet.ServletException: No suitable driver
org.apache.jasper.runtime.PageContextImpl.doHandlePageException
(PageContextImpl.java:845)
org.apache.jasper.runtime.PageContextImpl.handlePageException
(PageContextImpl.java:778)
org.apache.jsp.Booking.admin.Global_jsp._jspService
(org.apache.jsp.Booking.admin.Global_jsp:138)
org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:99)
javax.servlet.http.HttpServlet.service (HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:325)
org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service (JspServlet.java:245)
javax.servlet.http.HttpServlet.service (HttpServlet.java:802
=========

I check the similar post here and someone suggest it is classpath problem.
I find the following value is set in the apache tomcat property
C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\bootstrap.jar;

Anyone have suggestion for my case? Thank in advance

===========================================================================
To unsubscribe: mailto listserv@(protected)".
For digest: mailto listserv@(protected)".

Some relevant archives, FAQs and Forums on JSPs can be found at:

http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
http://forums.java.sun.com
http://www.jspinsider.com
©2008 junlu.com - Jax Systems, LLC, U.S.A.