java中写action时的注意点和问题解决

报错问题如下:
ERROR [com.opensymphony.xwork2.interceptor.ParametersInterceptor] - Developer Notification (set struts.devMode to false to disable this message):
Unexpected Exception caught setting ‘age’ on 'class com.itheima.web.action.UserAction: Error setting expression ‘age’ with value [‘21’, ]
Error setting expression ‘age’ with value [‘21’, ] - [unknown location]

解决方法:首先是要去到配置文件中进行特别是书写错误的排查和包括tomcat的设置问题,点很小但要格外注意。
其次是针对我如上报错问题,在action类中一定要记得进行对象的封装,很容易被忽略的小点,在此提醒。
java中写action时的注意点和问题解决

相关文章:

  • 2022-01-22
  • 2022-12-23
  • 2021-06-28
  • 2022-12-23
  • 2022-12-23
  • 2021-08-13
  • 2021-12-01
  • 2022-01-15
猜你喜欢
  • 2022-01-23
  • 2021-07-25
  • 2022-12-23
  • 2021-10-15
  • 2021-12-27
  • 2022-02-24
  • 2022-12-23
相关资源
相似解决方案