[ http://issues.apache.org/struts/browse/STR-1288?page=all ] David Evans closed STR-1288: ----------------------------
> Problem with resouce bundles when working with multiple modules > --------------------------------------------------------------- > > Key: STR-1288 > URL: http://issues.apache.org/struts/browse/STR-1288 > Project: Struts Action 1 > Type: Bug > Components: Taglibs > Versions: Unknown > Environment: Operating System: All > Platform: PC > Reporter: Guy Wens > Fix For: 1.2 Family > > <html:errors>, <html:messages> and <beans:message> only work ok the first > time > called in a JSP page when using modules and when not explicitly specifying a > resouce bundle in the Tag attribute. When they are called twice in the same > page, the tags don't find the default bundle for the module the second time. > Suppose we have a module "instruments": > <html> > ... > <bean:message key="title.createFund" /> <!-- ok --> > ... > <bean:message key="label.fundCode"/> <!-- nok --> > ... > </html> > If the previous code is like follows it works: > <html> > ... > <bean:message key="title.createFund" bundle='<%=Globals.MESSAGE_KEY > + "/instruments" %>' /> <!-- ok --> > ... > <bean:message key="label.fundCode" bundle='<%=Globals.MESSAGE_KEY > + "/instruments" /> <!-- ok --> > ... > </html> > I guess the tag is initialized ok (bundle=null) so it will look in the > request > scope first for the default bundle(Globals.MESSAGE_KEY + "/instruments"). > When > the release method is called, the bundle is not set to null, but to > Globals.MESSAGE_KEY. When processing the tag a second time, the bundle is not > null and the code will look immediately in the application scope for a bundle > name Globals.MESSAGE_KEY which is the default application bundle and not the > default module bundle. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]