Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@apache.org Received: (qmail 48157 invoked from network); 17 Sep 2002 11:47:43 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 17 Sep 2002 11:47:43 -0000 Received: (qmail 654 invoked by uid 97); 17 Sep 2002 11:48:05 -0000 Delivered-To: qmlist-jakarta-archive-struts-user@jakarta.apache.org Received: (qmail 624 invoked by uid 97); 17 Sep 2002 11:48:04 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 609 invoked by uid 98); 17 Sep 2002 11:48:04 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) From: To: "Struts Users Mailing List" Subject: Re: [STRUTS] Form error handling Date: Tue, 17 Sep 2002 7:49:04 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-Id: <20020917114904.CKWI25552.imf19bis.bellsouth.net@[192.168.1.29]> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Kiuma, You can use one of the following: tag: If placed at the top of a page, this will cause the errors to be displayed there. You should also ensure that errors.header and errors.footer messages are defined in your application resources file. This will help in the formatting of the resulting error messages. Something like: error.header=
    error.footer=
You could also use the validator tag which comes with the Struts Validation extension. It works similar except it acts as an iterator over all error messages.
There is a good write up on this provide by Ted Husted, Struts Tip #17. You can obtain a copy by joining the mvc-programmers forum hosted by BaseBeans.com. Hope that helps. Regards, Todd G. Nist > > From: kiuma > Date: 2002/09/17 Tue AM 07:00:28 EDT > To: Struts Users Mailing List > Subject: [STRUTS] Form error handling > > Hello, > mine is a newbie question: > > When validate fails i put some code like this: > > newError = new ActionError("myform.error", "") > errors.add( ActionErrors.GLOBAL_ERROR, newError ); > > in my properties file I put the key relative to myform.error. > > in struts-config.xml > > path="/listedUser" type="com.wingstech.webappointments.ListedUserAction" > parameter="action" validate="true"> > redirect="true" /> > > > When validate() returns error, struts should dirve me to input page. > > How can I parse errors in my jsp page, then? > > thanks, > kiuma > > > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > > -- To unsubscribe, e-mail: For additional commands, e-mail: