You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Pani, Gourav" <go...@brightpoint.com> on 2003/02/03 16:04:32 UTC
RE: ActionMessage does not appear in JSP unless ActionErrors used
aswell
Your html should be as follows:
<html:messages id="message" message="true">
The message="true" attribute lets it know you are looking for an
ActionMessage object not an ActionError.
-----Original Message-----
From: Huw Jones [mailto:jadestone@btclick.com]
Sent: Monday, February 03, 2003 10:02 AM
To: struts-user@jakarta.apache.org
Subject: ActionMessage does not appear in JSP unless ActionErrors used
aswell
I'm new to the Struts framework - I'm building a small form based
application but having
difficulties making the messaging api work for me. In the ActionForward
class I have the
following :-
ActionMessages messages = new ActionMessages();
messages.add(ActionMessages.GLOBAL_MESSAGE, new
ActionMessage("course.update"));
saveMessages(request,messages);
In my JSP
<html:messages id="message"><bean:write name="message"/></html:messages>
Using this no message appear. However if I add the error message then things
start to work
and messages appear correctly ie.
ActionMessages messages = new ActionMessages();
ActionErrors errors = new ActionErrors();
messages.add(ActionMessages.GLOBAL_MESSAGE, new
ActionMessage("course.update"));
saveMessages(request,messages);
errors.add(ActionErrors.GLOBAL_ERROR,new ActionError("course.update"));
saveErrors(request, errors);
What am I doing wrong - any suggestions gratefully received. I'm using
jakarta-struts-1.1-b3
distro under Tomcat 4.0.4
Huw Jones
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org