原因是,form中的组件设置了name属性,struts2会通过OGNL在action中找相应的属性。

<form action="login">
    <intput type="submit" name="submit">
<form>

如果你的LoginAction中有submit属性,将不会报错,反之会报错。

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
猜你喜欢
  • 2022-02-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-06
相关资源
相似解决方案