jsp传controller

Controller:

@RequestMapping({"/user"})
public void registerUser(User uu)
throws Exception
{
System.out.println(uu.getPhone());
}

jsp:

<form>

<input />

</form>

实体类:

public class User {
private String phone;//

public String getPhone() {
return phone;
}

public void setPhone(String phone) {
this.phone = phone;
}

}

 

controller传jsp

controller传对像,jsp页面用对象.属性接收

相关文章:

  • 2022-12-23
  • 2021-06-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
猜你喜欢
  • 2021-07-11
  • 2022-12-23
  • 2021-04-16
  • 2022-01-18
  • 2022-12-23
  • 2021-10-07
  • 2021-08-02
相关资源
相似解决方案