Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

displaying messages using <html:messages> tag

Status
Not open for further replies.

samit700

Programmer
Sep 23, 2003
52
US
Hi,

I am following the standard jakarta struts API to display action messages in my jsp page. But for some reasons, it is not displaying any action messages. However <action:errors> are working fine. There is no log for this problem so I can't figure out what the problem is. This is what I am using:

In my action:
// save action messages to display to user
ActionMessages messages = new ActionMessages();
messages.add(ActionMessages.GLOBAL_MESSAGE,
new ActionMessage("key"));
saveMessages(request, messages);

In my jsp page:
<ul>
<html:messages id="message" message="true">
<li><bean:write name="message"/></li>
</html:messages>
</ul>

Nothing is displayed on the screen for this messages. I have a well defined key for "key" in my message resources. Also if I do the same thing with ActionErrors, it works fine.

Can anyone please give some suggestions ?

Thanks in advance,
Samit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top