请问下!!
提示错误信息
org.apache.jasper.JasperException: /dologin.jsp (line: 2, column: 60) The JSP specification requires that an attribute name is preceded by whitespace
代码
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<jsp:useBean id="loginUser" class="com.po.Users"scope="page"></jsp:useBean>
<jsp:useBean id="userDAO" class="com.dao.UsersDAO"scope="page"></jsp:useBean>
<jsp:setProperty property="*" name="loginUser"/>
<%
request.setCharacterEncoding("utf-8");
%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
if(userDAO.usersLogin(loginUser)){
session.setAttribute("loginUser", loginUser.getUsername());
request.getRequestDispatcher("login_success.jsp").forward(request, response);
}else{
response.sendRedirect("login_fail.jsp");
}
%>
包:com.dao
文件:UsersDAO.java
package com.dao;
import com.po.Users;
//业务逻辑类
public class UsersDAO {
//用户登录方法
public boolean usersLogin(Users u)
{
if ("admin".equals(u.getUsername())&&"admin"
.equals(u.getPassword()))
{
return true;
}
else
{
return false;
}
}
}
包:com.po
文件:Users.java
package com.po;
//用户类
public class Users {
private String username;
private String password;
public Users()
{
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
我想问下 我哪错了????????