When you display the error messages in your JSP using either the <html:errors /> or <html:messages> tag, you can specify which resource bundle to use with the bundle attribute. If you don't specify a bundle, Struts will use the default bundle.
I can very well use more than one resource bundles in jsp using the way you mentioned. But is there any way by which I can let my action form know as to which resource bundle is used for this form.
Joined: Feb 15, 2005
Originally posted by Ritika Saxena: But is there any way by which I can let my action form know as to which resource bundle is used for this form.
No, there isn't. An ActionMessage does not contain information about which bundle will be used. All it has is a message key. If you wanted to, you could use one bundle for displaying it under one circumstance, and another for another circumstance.
As long as the JSP uses the correct bundle when displaying the error message, why does the ActionForm need to know which bundle is going to be used? [ May 10, 2007: Message edited by: Merrill Higginson ]