I think you are missing the save :)
try something like this:
ActionMessages messages = new ActionMessages();
MessageResources resource = getResources(request);
...
messages.add(ActionMessages.GLOBAL_MESSAGE, new
ActionMessage("global.error.database.problem"));
saveMessages(request, messages);
then in the jsp
<html:messages />
ActionErrors are being deprecated (from what i recall) and replaced
with ActionMessages.
Scott Purcell wrote:
Hello,
After I complete a successful Action, and I forward to my jsp page, I would like to display a status ... something like "New User Added".
Something that operates like the ActionErrors object. I tried doing this in my Action class:
ActionErrors errors = new ActionErrors();
// Get access to the message resources for this application
// There's not an easy way to access the resources from an ActionForm
MessageResources resources =
(MessageResources)request.getAttribute( Action.MESSAGES_KEY );
// Check and see if the access number is missing
ActionError newError = new ActionError("global.error.database.problem");
errors.add(ActionErrors.GLOBAL_ERROR, newError);
And then tried to pull the error out (just like an form error), but the error never shows?
<html:errors />
I figured I am missing something, or possibly there is a better way to handle this?
Thanks,
Scott
.
--
Jason Lea
|
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.8.1 - Release Date: 2005.03.23
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]