Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 1457 invoked from network); 5 Aug 2006 00:41:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Aug 2006 00:41:39 -0000 Received: (qmail 91539 invoked by uid 500); 5 Aug 2006 00:41:30 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 91360 invoked by uid 500); 5 Aug 2006 00:41:30 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 91349 invoked by uid 99); 5 Aug 2006 00:41:30 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Aug 2006 17:41:30 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of niall.pemberton@gmail.com designates 64.233.182.189 as permitted sender) Received: from [64.233.182.189] (HELO nf-out-0910.google.com) (64.233.182.189) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Aug 2006 17:41:29 -0700 Received: by nf-out-0910.google.com with SMTP id o63so326253nfa for ; Fri, 04 Aug 2006 17:41:08 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SMG8fHdYFzkriBUO5Xj2TTxNYaOfNQUIoxmPfkzBSo7Dkb3rsgqeF3Bbb3RJ83BN2fIzHJ8XMNwLEMek2GSbvuBTC8I9/pgO3ia8RL9p7lsU063yOwldiciEFPZEBu5R47YV688CaCO+x9ffIDC1T4kOlkt6ll9C7m7gKRMJV5A= Received: by 10.78.132.12 with SMTP id f12mr1754494hud; Fri, 04 Aug 2006 17:41:08 -0700 (PDT) Received: by 10.78.143.16 with HTTP; Fri, 4 Aug 2006 17:41:08 -0700 (PDT) Message-ID: <55afdc850608041741j641e1dfdud85a2450bd74840d@mail.gmail.com> Date: Sat, 5 Aug 2006 01:41:08 +0100 From: "Niall Pemberton" To: "Struts Users Mailing List" Subject: Re: Need help in how to display error messages In-Reply-To: <20060805000759.84369.qmail@web60224.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060805000759.84369.qmail@web60224.mail.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N The reason this is happening is because (normally) your ActionMessage contains the key - and then the tag looks up the actual message (i.e. "resolves the message") - but you're actually resolving the message yourself in the Action. Try just creating the ActionMessage with the key: ActionMessage error = new ActionMessage("error.message.filemanagement.errorsavingconfiguration"); Niall On 8/5/06, Niniva Ray wrote: > Hi, > > I am working on a web application where I am using struts 1.2.9. > The problem I am encountering is whenever I want to show any messages on the browser, suppose if I want to show the message "Error saving configuration", > it is displaying ???en_US.Error saving configuration??? > > The details of what I have are > In my struts-config file I have > > > I have FileManagementResources.properties file in the com.mng.filemanagement.resources package. > > In this properties file I have the entry, > error.message.filemanagement.errorsavingconfiguration=Error saving configuration > > In my Action class I have, > MessageResources messageResources = getResources(request); // request is HttpServletRequest > ActionMessage error = new ActionMessage(messageResources.getMessage("error.message.filemanagement.errorsavingconfiguration")); > ActionMessages errors = new ActionMessages(); > errors.add(FileManagementConstants.ERROR_KEY, error); // FileManagementConstants.ERROR_KEY is a string with value error > addErrors(request, errors); > > In my jsp page I have > > >
>
>
> > This displays ???en_US.Error saving configuration??? > when error happens, instead of Error saving configuration. > > I am supporting only one language English. > I think I am missing something, could anyone give me some pointers what I am doing wrong? > > Thanks, > NR > > > --------------------------------- > See the all-new, redesigned Yahoo.com. Check it out. > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org