Try, 

<logic:messagesPresent message="true">
<html:messages id="message" message="true">
        <bean:write name="message" />
</html:messages>
</logic:messagesPresent>

The message="true" attribute tells the message tags to check for
ActionMessages as opposed to actionErrors. 

Jamie Cruz
Software Engineering 
[EMAIL PROTECTED] 
(301)688-1430 





-----Original Message-----
From: Ant�nio Santos [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 11:48 AM
To: [EMAIL PROTECTED]
Subject: how to print ActionMessages that were saved in an Action?



Hi all,

I'm new here and this is my first post.
I'm trying to insert an ActionMessage in the request inside an Action class.
I'm using the following code:

ActionMessages messages = new ActionMessages();
ActionMessage newmessage = new ActionMessage("messages.general", "XXX");
messages.add(ActionMessages.GLOBAL_MESSAGE, newmessage);
saveMessages(request, messages);

Now, how can I print it in the JSP (in the same way as I can print the
ActionErrors)? I guess that that should be made by using the following code:

<html:messages id="message">
        <bean:write name="message" />
</html:messages>

But this doesn't work... :( This piece of code should work to print out all
the ActionMessages saved (in case of having more than one), right?

Any clues?

Thanks,

Antonio Santos


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to