Jsp点击登录提交后报错

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: /doLogin.jsp (line: 7, column: 0) According to TLD, tag jsp:setProperty must be empty, but is not
	org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
	org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)
	org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:133)
	org.apache.jasper.compiler.Parser.parseBody(Parser.java:1633)
	org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1002)
	org.apache.jasper.compiler.Parser.parseSetProperty(Parser.java:918)
	org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1134)
	org.apache.jasper.compiler.Parser.parseElements(Parser.java:1451)
	org.apache.jasper.compiler.Parser.parse(Parser.java:138)
	org.apache.jasper.compiler.ParserController.doParse(ParserController.java:242)
	org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)


note The full stack trace of the root cause is available in the Apache Tomcat/7.0.27 logs.


Apache Tomcat/7.0.27


这是doLogin.jsp的内容

<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	request.setCharacterEncoding("utf-8");
%>
<jsp:useBean id="loginUser" class="com.po.Users" scope="page"></jsp:useBean>
<jsp:setProperty name="loginUser" property="*">
	<jsp:useBean id="userDAO" class="com.dao.UserDAO" scope="page"></jsp:useBean>
	<%
		if (userDAO.usersLogin(loginUser)) {
			session.setAttribute("loginUser", loginUser.getUsername());
			request.getRequestDispatcher("login_success.jsp").forward(request, response);
		} else {
			response.sendRedirect("login_failure.jsp");
		}
	%>


歆时
浏览 6393回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP