<%@page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<jsp:useBean id="feng" scope="page" class="feng.Jdbc" /><%
 String User_Name=request.getParameter("username");
 String Pass_Word=request.getParameter("password");
  if ((User_Name.equals("")) || (Pass_Word.equals("")))
     response.sendRedirect("err.jsp?id=1");
  else
  {
   
    Connection con=feng.getConn();
    Statement  stmt=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
    ResultSet  rs=null;
    String sql="Select * From admin Where username='"+User_Name+"' And password='"+Pass_Word+"'";
    rs=stmt.executeQuery(sql);
    rs.last();
 if (rs.getRow()>0)
{
session.putValue("UserName",User_Name);
 if (rs.getInt("qx")==1) {
session.putValue("admin","ok");

///response.sendRedirect("admin.jsp");
     %>
<jsp:forward page="admin.jsp"/>
<%
}
else {
response.sendRedirect("info.jsp?id="+User_Name);

}
// <a href="javascript:history.go(-1)"></a>
 
    }
else {
        response.sendRedirect("err.jsp?id=2");
        }
 try {  
              rs.close();
              stmt.close();
              con.close();
            }
            catch (Exception ex) {
            System.out.println(ex);
            ex.printStackTrace();
            }

  }
%>
跳转就出错
description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: Unable to compile class for JSPNo Java compiler was found to compile the generated source for the JSP. 
This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK 
to the common/lib directory of the Tomcat server, followed by a Tomcat restart. 
If using an alternate Java compiler, please check its installation and access path. org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:128)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:413)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:437)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
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.