错误信息:
HTTP Status 500 -type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: org.apache.jasper.JasperException: Unable to load class for JSP org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:156) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329) 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
org.apache.jasper.JasperException: Unable to load class for JSP org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:620) org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329) 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: org.apache.jsp.login_005fconf_jsp java.net.URLClassLoader$1.run(URLClassLoader.java:200) java.security.AccessController.doPrivileged(Native Method) java.net.URLClassLoader.findClass(URLClassLoader.java:188) org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134) org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66) org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:618) org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329) 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)note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
Apache Tomcat/6.0.18
具体的源代码:
<%@ page language="java" import="java.util.*,,java.sql.*,dao.DBConnection" pageEncoding="gbk"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
</head>
<body>
<%!
Connection con=null;
PreparedStatement pstmt=null;
ResultSet rs=null;
%>
<%
boolean flag=false;
String id=request.getParameter("id");
String password=request.getParameter("password");
%>
<%
String sql="select name from person where id=? and password=?";
con=DBConnection.getConnection();
pstmt=con.prepareStatement(sql);
pstmt.setString(1,id);
pstmt.setString(2,password);
rs=pstmt.executeQuery();
if(rs.next()){
flag=true;
session.setAttribute("uname",rs.getString(1));
}else{
session.setAttribute("err","错误的用户名或密码!!!");
}
rs.close();
pstmt.close();
con.close();
%>
<%
if(flag=true)
{
%>
<jsp:forward page="login_success.jsp"/>
<%}
else{
%>
<jsp:forward page="login.jsp"/>
<% } %>
</body>
</html>
急,哪个大侠能帮帮得