日期:2014-05-17 浏览次数:20767 次
public class User {
private int id;
private String username;
private String password;
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;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
}
public class UserAction extends ActionSupport {
private User user;
private List<User> users;
private UserManager um = new UserManager();
public UserAction() {
}
@Override
public String execute() throws Exception {
return "success";
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public List<User> getUsers() {
return users;
}
public void setUsers(List<User> users) {
this.users = users;
}
public String list() {
users = um.getUsers();
return "userList";
}
}