struts 2 Bean 未填充到操作类中
我在作业中使用 Struts 2-Spring 框架。
我在 struts 2 操作类中定义了一个 bean
一个拦截器,用于在执行每个操作之前检查授权。
该bean用于在jsp页面上定义文本字段、单选按钮等控件。
提交此页面时,控件会正确转到定义的操作类,但在操作类中发现 bean 对象为 null。因此无法执行进一步的操作。
删除拦截器效果很好。
任何指针将不胜感激。
I am using Struts 2-Spring framework in my assignment.
I have defined a bean in struts 2 action class
One interceptor for checking authorisation before executing every action.
The bean is used for defining controls like textfield, Radio button, etc on jsp page.
On submit of this page control goes properly to defined action class, but finds bean object as null in action class. Hence unable to perform futher operations.
Removing interceptors works fine.
Any pointer will be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(1)
我还没有为 struts.xml 中定义的拦截器定义堆栈。
在 struts.xml 中定义以下堆栈后,它可以正常工作:
I haven't defined stack for interceptors defined in struts.xml.
After defining below stack in struts.xml its works fine: