[ http://issues.apache.org/struts/browse/STR-1094?page=all ]
David Evans reopened STR-1094:
------------------------------
Assign To: Ted Husted (was: David M. Karr)
> wrong resource file used in multi-application context with html:messages
> ------------------------------------------------------------------------
>
> Key: STR-1094
> URL: http://issues.apache.org/struts/browse/STR-1094
> Project: Struts Action 1
> Type: Bug
> Components: Taglibs
> Versions: 1.1 Beta 3
> Environment: Operating System: All
> Platform: PC
> Reporter: Nick Daniau
> Assignee: Ted Husted
> Fix For: 1.1 Family
>
> The html:messages tag does not seam to be aware of Struts multi-application,
> and therefore the message resource used is not the correct one. On the other
> hand html:errors works properly. See demonstration deails below.
> I submit this as a new bug but please compare with 12702 and 11932 to ensure
> it's not a duplicate (though my opinion is it may be related but is not the
> same one).
> I have a WAR with Struts 1.1b3 containing 2 config files:
> - struts-config.xml for the 'main' application which defines a MessageResource A
> the resource contains the property: message=Test Message A
> - struts-config-sub.xml for a sub-application which defines a MessageResource B
> the resource contains the property: message=Test Message B
> In an action defined in the sub-application (struts-config-sub.xml) I have the
> following code:
>
> errors = new ActionErrors();
> errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("message"));
> saveErrors(request, errors);
> And on the JSP I forward to I have this sequence:
>
> Errors:
>
>
> Message:
>
>
>
>
> The JSP displays the following:
>
> Errors:
> Test Message B
>
> Message:
> Test Message A
>
> This shows, unless I've missed something, that:
> - the html:errors tag displays the correct message taken from the resource of
> the sub-application as it should
> - on the contrary, the tag html:messages does not take into account the sub-
> application and wrongly displays the message from the 'main' application
> resource
--
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