Hi Noel,
Thanks for that. Since that post, I have opted for constructing an ActionMessages
object and populating it with ActionMessage (s). This being because I hear
ActionError/s are deprecated as of Struts 1.2.
I have set up the Application.properties file under WEB-INF/classes/resources
containing:
initialisation.error=Initialisation error - invalid UserID
I catch the exception thus:
ActionMessages messages = new ActionMessages();
ActionMessage errorMsg = new ActionMessage("initialisation.error");
messages.add("init_message", errorMsg);
saveMessages(request, messages);
and forward off to the error page, but nothing is rendered.
Any idea here? Perhaps something to do with the init_message string I am passing? What
does that represent?
appreciated
G.
Hi Jerald,
The single-string ActionError class constructor that you are invoking
interprets the parameter passed to it as a key of a message string defined
in your Application.properties file (this file is usually placed under the
classes/resources directory).
HTH
Noel
-----Original Message-----
From: Jerald Powel [mailto:[EMAIL PROTECTED]
Sent: Sunday, December 21, 2003 9:45 PM
To: Struts Users Mailing List
Subject: [other] error tag
Hello,
I am handling my errors and constructing an errors object thus:
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new
ActionError("Initialisation error - userID not found"));
saveErrors(request, errors);
return mapping.findForward(FORWARD_error);
how from the JSP do I iterate over the errors object and retrieve the
messages please? I have tried but nothing was rendered to the
screen?
thanks
G
---------------------------------
Yahoo! Messenger - Communicate instantly..."Ping" your friends today!
Download Messenger Now
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------
Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download
Messenger Now