You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Raible, Matt" <Ma...@cable.comcast.com> on 2003/06/24 18:56:18 UTC

RE: ExceptionConfig bundle Attribute & Using Multiple Message Res ourc es.

new ActionError("error.key") works fine - why not use that?  or use
MessageResources resources = getResources(request) like you normally would.
Here's a sample/discussion I recently posted:

http://raibledesigns.com/page/rd?anchor=re_using_struts_declared_exceptions

-----Original Message-----
From: Butash, Bob [mailto:bob.butash@eds.com]
Sent: Tuesday, June 24, 2003 10:41 AM
To: 'Struts Users Mailing List'
Subject: ExceptionConfig bundle Attribute & Using Multiple Message
Resourc es.


We are trying to create an ExceptionHandler that has some built in logging
capabilities and one of the items that we would like to log is the Formatted
message that is associated with the Error key.  So we are trying to
determine a way to get visibility to the message resources.  The
ExceptionHandler's execute method does not get the Action class therefore
there is no visibility to the ServletContext.  Does anyone have any ideas in
this area?

Also while we were investigating this we stumbled on a couple of questions
that we have not been able to resolve.

ExceptionConfig has a bundle attribute:
I have seen very little documentation as to what this is actually used for.
If I provide an actual ResourceBundle name here it is not used when
formatting the message to the view.  Does anyone know what this is intended
to be used for?

Taking advantage of multiple message resources:
It is clearly documented how you establish multiple message-resources, but I
have not been able to locate how you designate that you want to use a
secondary message resource.  For example I want to create an ActionError
with a message key that is obtained from a different message resource file,
how is this done?

Any help would be great, thanks in advance.

---------------------------------------------------------------------
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