1. Make sure you have the correct entry in your
ApplicationResources.properties file like this:
anything=Hello user this is a message for you.
Note: Sorry if this is obvious but the word "anything" is not what is
stored. Rather new ActionMessage("anything")stores the message in your
application resources file named "anything".
Note: Usually instead of "anything" this would be named something like
"messages.program_section.anything".
2. I don't believe you need the logic:messagesPresent
tag...html:messages will only output if there are messages present. But
that may depend on your version of Struts.
3. If you have Struts 1.2.4 or above you don't need the c:out so that
message would just be:
<html:messages id="message" message="true">
${message}<br>
</html:messages>
Brady
> hi all
>
> i have action messages added in the Action.
>
> ActionMessages messages = new ActionMessages();
> messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("anything"));
> messages.add("message", new ActionMessage("something","someValue"));
> saveMessages(request, messages);
>
> and in the JSP page , i have the following code
>
> <logic:messagesPresent message="true">
> <html:messages id="message" message="true">
> <c:out value="${message}"/><br>
> </html:messages>
> </logic:messagesPresent>
>
> but it does not show anything . and surprizingly my jsp page goes half-blank.
> i tried all that i can. but couldn't get through ..
>
> any help is appriciated ..
>
> Regards,
> Sachin Hegde
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
Brady Hegberg <[EMAIL PROTECTED]>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]