我是一个刚学习jsp的。
错误提试是:
HTTP Status 500 -
--------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: db/dateconnection
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp.MyJsp_jsp._jspService(MyJsp_jsp.java:159)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause
java.lang.NoClassDefFoundError: db/dateconnection
org.apache.jsp.MyJsp_jsp._jspService(MyJsp_jsp.java:75)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
note The full stack trace of the root cause is available in the Tomcat logs.
--------------------------------------------
Apache Tomcat/5.0.19
jsp原文件是:
<%@ page language= "java " import= "java.util.* " pageEncoding= "UTF-8 "%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+ ":// "+request.getServerName()+ ": "+request.getServerPort()+path+ "/ ";
%>
<jsp:useBean id= "tt " class= "bb.dateconnection " scope= "request " />
<%
java.sql.ResultSet trs=tt.show();
// while(rs.next())
// {
// out.print(rs.getString(0));
// }
%>
<html>
<head>
<base href= " <%=basePath%> ">
<title> My JSP 'MyJsp.jsp ' starting page </title>
</head>
<body>
<P> <BR> 欢迎进入平平留言中心: </P>
<P> 输入条件: </P>
<form name=form2 action= "MyJsp.jsp " method= "post ">
<TABLE border= "0 " width= "200px ">
<tr>