This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Struts and the fly likes usage of ActionMessages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "usage of ActionMessages" Watch "usage of ActionMessages" New topic
Author

usage of ActionMessages

ashwin deshpande
Greenhorn

Joined: Jun 14, 2004
Posts: 6
hi,

Im trying to use ActionMessages in my jsp...

here is the code snippet...

----------------------------------------------
MyActionClass

ActionMessages messages = new ActionMessages();
messages.add("noRecordsFound", new ActionMessags("records.notFound"));
saveMessages(req, messages);

return mapping.getInputForward();
-----------------------------------------------

myJSP.jsp

actually here i tried using
<logic:messagesPresent> tag, <logic:match> tag and <html:messages> tag, but i just cant seem to get it right... i would really appreciate if you could post the correspond jsp code for the above messages...

thanks

ashwin


If at first you dont succeed, take the 5th !
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: usage of ActionMessages