struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Kriger" <akri...@greaterthanone.com>
Subject RE: ActionErrors question
Date Fri, 10 Jan 2003 20:52:12 GMT
(oops - sloppy fingers on a friday afternoon - ignore that last message)

So the bundle that holds the errors depends on the bundle that the keys come
from? Is there any way to separate this so that all errors always go to one
bundle regardless of where the message keys are stored? (that design seems
out-of-line with the rest of Struts which usually has good separation of
functionality)

thx

-----Original Message-----
From: Alvarado, Juan (c) [mailto:Juan.Alvarado@NielsenMedia.com]
Sent: Friday, January 10, 2003 15:32
To: 'Struts Users Mailing List'
Subject: RE: ActionErrors question


It sounds to me like the keys that you are using in your action errors are
in the non-default message resource file in your application; the one with
the key defined.

If you don't want to use the bundle attribute in your call to
<html:errors... I suggest you move those keys to the default message
resource file in your app.

-----Original Message-----
From: Andy Kriger [mailto:akriger@greaterthanone.com]
Sent: Friday, January 10, 2003 3:34 PM
To: Struts Users Mailing List
Subject: ActionErrors question


I have 2 message-resources defined in my webapp (one has a key defined the
other does not). In one action, I am getting messages from the non-default
message-resource (the one with a key defined). In that action I also create
an errors object and add errors to it...

getResource(request, key)
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(key, val1, val2);
saveErrors(request, errors);
mapping.findForward(...);

In the JSP I display the errors...
<html:errors />

However, this displays nothing _unless_ I do <html:errors bundle="key"/>

Why are the errors added in the 'key' bundle instead of the default bundle?

This is with Struts 1.1b2.

thx
andy



--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>




--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message