Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 49636 invoked from network); 13 Aug 2008 12:05:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Aug 2008 12:05:59 -0000 Received: (qmail 89686 invoked by uid 500); 13 Aug 2008 12:05:48 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 89650 invoked by uid 500); 13 Aug 2008 12:05:48 -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 89639 invoked by uid 99); 13 Aug 2008 12:05:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Aug 2008 05:05:48 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [79.148.234.206] (HELO correo.xeridia.com) (79.148.234.206) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Aug 2008 12:04:52 +0000 Received: from localhost (localhost [127.0.0.1]) by correo.xeridia.com (Postfix) with ESMTP id 80C5B3781EC for ; Wed, 13 Aug 2008 14:04:46 +0200 (CEST) Received: from correo.xeridia.com ([127.0.0.1]) by localhost (correo.xeridia.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12001-07 for ; Wed, 13 Aug 2008 14:04:46 +0200 (CEST) Received: from [192.168.1.24] (xer-leon9.xeridialeon.local [192.168.1.24]) by correo.xeridia.com (Postfix) with ESMTP id 54957378195 for ; Wed, 13 Aug 2008 14:04:46 +0200 (CEST) Message-ID: <48A2CDE1.606@xeridia.com> Date: Wed, 13 Aug 2008 14:04:49 +0200 From: =?ISO-8859-1?Q?Diego_Manilla_Su=E1rez?= User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Struts Users Mailing List Subject: Re: [S2] Proper way to clear error messages in session scope References: <48A13D4A.30106@xeridia.com> In-Reply-To: <48A13D4A.30106@xeridia.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Well, I've put this line just below the tags and : <%((ActionSupport) ActionContext.getContext().getActionInvocation().getAction()).clearErrorsAndMessages();%> I don't like putting Java code on JSPs and I'm sure there is a better way to do it, but so far it's working. Regards, Diego. Diego Manilla Su�rez escribi�: > Hi. I have an action in session scope. The problem is that action > errors are never cleared and thus are shown repeatedly whenever the > user sends the form with validation errors. > > At first I put a call to clearErrors() at the beginning of mi > validate() method, but now I'm using also the validation framework, so > if I do that, I'm clearing its validation errors too before they are > even shown. > > I think the right place to clear errors would be right after they are > printed, but I don't see any tag to do that. > > Thanks in advance. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org