JSP做动态网页,用TOMCAT预览 错误提示如下:
descriptionTheserverencounteredaninternalerror()thatpreventeditfromfulfillingthisrequ...
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbvDriver
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
javax.servlet.ServletException: java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbvDriver
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:852)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.checklogin_jsp._jspService(checklogin_jsp.java:91)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbvDriver
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:128)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Unknown Source)
org.apache.jsp.checklogin_jsp._jspService(checklogin_jsp.java:64)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
求解... 展开
exception
org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbvDriver
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
javax.servlet.ServletException: java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbvDriver
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:852)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.checklogin_jsp._jspService(checklogin_jsp.java:91)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbvDriver
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:128)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Unknown Source)
org.apache.jsp.checklogin_jsp._jspService(checklogin_jsp.java:64)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
求解... 展开
4个回答
展开全部
改成
String name= request.getParameter("name");
String password = request.getParameter("password");
String sql ="select * from member where name='"+name+"' and password='"+password+"'";
Statement stmt=conn.createStatement();
ResultSet rs = stmt.executeQuery(sql);
if(rs!=null&&rs.next()){
session.setAttribute("name",name);
response.sendRedirect("re-index.html");
}else{
out.println("用户名或密码错误");
}
别的代码看不到了
String name= request.getParameter("name");
String password = request.getParameter("password");
String sql ="select * from member where name='"+name+"' and password='"+password+"'";
Statement stmt=conn.createStatement();
ResultSet rs = stmt.executeQuery(sql);
if(rs!=null&&rs.next()){
session.setAttribute("name",name);
response.sendRedirect("re-index.html");
}else{
out.println("用户名或密码错误");
}
别的代码看不到了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbvDriver
他说没找到那个驱动程序啊,你写了没(就是class.forname(sun.jdbc.odbc.JdbcOdbvDriver
);),如果写了,建数据源了么,这个是JDBC-ODBC桥接吧
他说没找到那个驱动程序啊,你写了没(就是class.forname(sun.jdbc.odbc.JdbcOdbvDriver
);),如果写了,建数据源了么,这个是JDBC-ODBC桥接吧
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
把sun.jdbc.odbc.JdbcOdbvDriver改成sun.jdbc.odbc.JdbcOdbcDriver
给分吧!
给分吧!
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
好像是没找到那个包sun.jdbc.odbc.JdbcOdbvDriver
或者连接语句有错!
或者连接语句有错!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询