public class UserAction{

 private User user;

public String add()

{

 System.out.println("name="+user.getName());

System.out.println("age="+user.getAge());

return SUCCESS;

}

 public User getUser()

{

 return user;

}

public void setUser(User user)

{

 this.user=user;

}

 

}

可用user!add?user.name=xx&user.age=9来调用。

 

还有一种情况是用dto对象来传递参数 newUser(userdto dto)

在user跟Userdto对不上的时候使用,比如userdto比user 多confirmpassword..

相关文章:

  • 2021-12-30
  • 2021-12-15
  • 2022-02-07
  • 2022-02-09
  • 2021-11-10
  • 2021-08-16
  • 2021-12-17
  • 2022-12-23
猜你喜欢
  • 2021-06-13
  • 2022-12-23
  • 2022-12-23
  • 2022-03-09
  • 2021-09-02
  • 2021-11-29
  • 2021-08-02
相关资源
相似解决方案