From issues-return-32-apmail-struts-issues-archive=struts.apache.org@struts.apache.org Tue May 02 00:32:58 2006 Return-Path: Delivered-To: apmail-struts-issues-archive@locus.apache.org Received: (qmail 24432 invoked from network); 2 May 2006 00:32:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 May 2006 00:32:57 -0000 Received: (qmail 77007 invoked by uid 500); 2 May 2006 00:32:50 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 76945 invoked by uid 500); 2 May 2006 00:32:50 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 76933 invoked by uid 99); 2 May 2006 00:32:49 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 May 2006 17:32:49 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 May 2006 17:32:49 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0E3447142A6 for ; Tue, 2 May 2006 00:32:19 +0000 (GMT) Message-ID: <28083315.1146529939055.JavaMail.jira@brutus> Date: Tue, 2 May 2006 00:32:19 +0000 (GMT+00:00) From: "David Evans (JIRA)" To: issues@struts.apache.org Subject: [jira] Reopened: (STR-1094) wrong resource file used in multi-application context with html:messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ 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