I think just make sure any existing messages object is not replaced e.g. ActionMessages errors = new ActionMessages(); errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("my.error.key")); saveErrors(request, errors); ... // then later errors = form.validate(mapping, request); // returns a new ActionMessages object saveErrors(request, errors); ... in above case the 2nd saveErrors() call would replace the initial messages
________________________________ From: Tom Jerry [mailto:[EMAIL PROTECTED] Sent: Mon 18/09/2006 8:26 PM To: Struts Users Mailing List Subject: Re: validation Thank you so much. It worked. btw, what did u mean "be careful to perserve any messages" ? On 9/18/06, Ted Husted <[EMAIL PROTECTED]> wrote: > > Yes, but you have to call the super class's validate to fire the > validation framework, and be careful to perserve any messages. > > -- HTH, Ted. > * http://www.husted.com/struts/ > > On 9/18/06, Tom Jerry <[EMAIL PROTECTED]> wrote: > > is it NOT possible to use both validation.xml and ActionErrors validate > ( ) > > ?????? > > > > For eg: consider Login Form. > > > > 1) I used validation.xml to make sure that the username / password > fields > > are not empty. > > 2) I used validate ( ) to validate the values entered in the form fields > > > > If I use either of them, output comes. > > > > If I use both of them, no expected output comes. > > > > That is the problem with my appln. Please help. > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > ********************************************************************** This message is intended for the addressee named and may contain privileged information or confidential information or both. If you are not the intended recipient please delete it and notify the sender. ********************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]