public class User implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
private String name;
public User(){
System.out.println("========空的构造方法=必须有======");
}
public User(String name){
this.name = name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
public class UserAction extends ActionSupport{
/**
*
*/
private static final long serialVersionUID = 1L;
private String name;
private User user;
@Override
public String execute() throws Exception {
System.out.println(user.getName());
return ActionSupport.SUCCESS;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
}