type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: Unable to compile class for JSP: 
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.10 logs.
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  </head>
  
  <body>
    <center>
    <h1>欢迎登录</h1><hr/>
    <form action="logindo.jsp" method="post">
    <table width="250" border="1">
    <tr><td>用户名:</td><td><input type="text" name="uname"/></td></tr>
    <tr><td>密码:</td><td><input type="password" name="pwd"/></td></tr>
    <tr><td colspan="2"><input type="submit" value="提交"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input type="reset" value="重置"/></td></tr>
    </table>
    </form>
    </center>
    <%
    if(request.getAttribute("error")!=null)
     out.println(request.getAttribute("error"));
     %>
  </body>
</html><%@ page language="java" import="java.util.*,java.sql.*" pageEncoding="UTF-8"%>
<%@page import="com.microsoft.sqlserver.jdbc.SQLServerDriver"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'logindo.jsp' starting page</title>
    
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->  </head>
  
  <body>
     <%
      String uname=request.getParameter("uname");
      String pwd=request.getParameter("pwd");
      Connection con=null;
      PreparedStatement ps=null;
      ResultSet rs=null;
      final String DRIVER="com.microsoft.sqlserver.jdbc.SQLServerDriver";
  final String UNAME="sa";
  final String PWD="sa";
  final String URL="jdbc:sqlserver://127.0.0.1:1433;databaseName=test";
     String sql="select count(*) from users where uname=? and pwd=?";
     boolean flag=false;
     try{
     Class.forName(DRIVER);
     con=DriverManager.getConnection(URL,UNAME,PWD);
     ps=con.prepareStatement(sql);
     ps.setString(1,uname);
     ps.setString(2,pwd);
     rs=ps.executeQuery();
     rs.next();
     int count=rs.getInt(1);
     if(count>0){
     flag=true;
     }
     }catch(Exception ex){
     ex.printStackTrace();
     }finally{
     try{
     }catch(Exception ex){
     ex.printStackTrace();
     }
     }if(flag){
     request.getRequestDispatcher("success.jsp").forward(request,response);
     }else{
     request.setAttribute("error","check your name and pwd,login again");
     request.getRequestDispatcher("login.jsp").forward(request,response);
     }
     %>
  </body>
</html>