prevented it from fulfilling this request 错误,请高手指点
错误界面
type Exception report
message
description
The server encountered an internal error () that prevented it from fulfilling this request.exception
org.apache.jasper.JasperException: /check_login.jsp(2,5) Invalid standard action
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:90)
org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1249)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1559)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.30 logs.
jsp代码:
<html>
<jsp:check_login id="test" class="check_login"/>
<head><title>check_login.jsp</title></head>
<body>
<%
test.init(request,out);
test.execute();
test.clean();
%>
</body>
</html>
BEAN代码:
import java.sql.*;
import javax.servlet.*;
import javax.servlet.jsp.*;
public class check_login{
ServletRequest request;
JspWriter out;
public void check_login(){}
public void init(ServletRequest req,JspWriter ou){
request=req;
out=ou;
}
public void execute(){
String name;
String pwd;
name=request.getParameter("name");
pwd=request.getParameter("password");
/*try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:study");
Statement stmt=con.createStatement();
stmt.executeUpdate("insert into userinfo values('"+name+"','"+pwd+"')");
ResultSet rs=stmt.executeQuery("select * from userinfo");
out.print("<pre>");
out.println("All user in DB");
while (rs.next())
{
out.print("username");
out.print(rs.getString("name")+" passwor:");
out.print(rs.getString("pwd"));
}
out.print("</pre>");
rs.close();
stmt.close();
con.close();
}catch(Exception ex){
System.out.println(ex.getMessage());
}*/
}
public void clean(){
request=null;
out=null;
}
}
------解决方案--------------------
<jsp:check_login id=&quo