代码及运行错误提示如下:
loginSyccess.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>success</title>
</head>
<body>
<jsp:useBean id="user" type="dto.User" scope="request">
</jsp:useBean>
欢迎<jsp:getProperty property="name" name="user"/>登录成功!
</body>
</html>
在dto包下有.Java文件
package dto;
public class User {
private String name;
private String password;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getpassword() {
return password;
}
public void setpassword(String password) {
this.password = password;
}
}