开发者

What is the equivalent of Struts ActionMessages in Spring MVC?

Please let me know if you have any idea about it.

Thanks

EDIT

What ActionMessages is?

ActionMessages i开发者_运维技巧s basically a class that holds messages that you want to display on a JSP page. Messages can be added in ActionMessages in an Action(controller) class. On the JSP, the position where the messages are intended to be displayed, is marked by <html:messages/> tag. Hence, all your messages are rendered automatically on that specific position.

These messages are usually feedback texts that need to appear after some user actions. For example, if the user creates a new record, a feedback message could be "Record created successfully!".


Spring has an Errors class (refer to the Chapter 5. Validation, Data-binding, the BeanWrapper, and PropertyEditors) to report... errors but no direct equivalent of Struts ActionMessage (can be used for regular messages too, not only errors). There is a Jira issue about this: SPR-2657.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜