I have read the API as well as some books on the topic...but no where have I seen where this attribute could be used.
I do not believe the JSP has visibility to the ExceptionConfig, nor would it make sense to give them visibility since the JSP should not have knowledge that an exception occurred, they should just work with the ActionErrors/Messages. The ExceptionConfig is passed into the ExceptionHandler, but since there is no visibility to the ServletContext there is no way you could obtain the message-resource based on the bundle name. That is why I was asking what is the intended purpose of this attribute, maybe I'm missing something. I was hoping to use it in a subclass of ExceptionHandler so I could log the message that was associated with the Exception. -----Original Message----- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 3:18 PM To: Struts Users Mailing List Subject: Re: ExceptionConfig bundle Attribute & Using Multiple Message Resources. >From the struts-config_1_1.dtd <!-- The "exception" element registers an ExceptionHandler for an exception type. The following attributes are defined: bundle Servlet context attribute for the message resources bundle associated with this handler. The default attribute is the value specified by the string constant declared at Globals.MESSAGES_KEY. [org.apache.struts.Globals.MESSAGES_KEY] className The configuration bean for this ExceptionHandler object. If specified, className must be a subclass of the default configuration bean ["org.apache.struts.config.ExceptionConfig"] So, by specifying bundle="AlternateApplicationResources", this would pull the value specified by the key from AlternateApplicationResources.properties instead of the default bundle. While not specifically using this in the struts-example for ExceptionConfig, it does show how to use it in the tags. -- James Mitchell Software Developer/Struts Evangelist http://www.struts-atlanta.org ----- Original Message ----- From: "Butash, Bob" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Wednesday, June 25, 2003 2:57 PM Subject: RE: ExceptionConfig bundle Attribute & Using Multiple Message Resources. > I have figured out how to use different message resources, based on a > response to a previous post. > > I still have not found further information regarding the bundle attribute on > ExceptionConfig. > > 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? > > Any help would be appreciated. > > -----Original Message----- > From: Butash, Bob [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 24, 2003 12:41 PM > 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]