struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Benedict <paul4chris...@yahoo.com>
Subject Re: Declarative Exception Handling with Struts Validation
Date Wed, 17 May 2006 01:11:37 GMT
saveErrors is not deprecated. I use it in Struts 1.2.

--- Asad Habib <ahabib@engin.umich.edu> wrote:

> Paul, what method do I use to save them? I am using Struts 1.2.9 and as 
> far as I know the saveErrors method has been deprecated. Is there another 
> method that replaced this one? Thanks.
> 
> - Asad
> 
> On Tue, 16 May 2006, Paul Benedict wrote:
> 
> > Asad,
> >
> > I have not had this problem. I use declarative exception all the time.
> > Two things to look for:
> >
> > 1) Make sure you're actually saving the errors messages after you generate
> > them. Calling form.validate() only makes them; make sure you save them
> > in the request.
> >
> > 2) Make sure you're not redirecting. You will lose them, unless you
> > place the error messages in the session.
> >
> > Paul
> >
> > --- Asad Habib <ahabib@engin.umich.edu> wrote:
> >
> >> Okay, I've finally got this working except for one piece. I use
> >> form.validate in my action to retrieve errors placed by the Struts
> >> Validator in the ActionErrors object. Depending on the type of error in
> >> ActionErrors, my action throws an exception and this in turn triggers
> >> forwarding to a particular view based on the value of the path attribute
> >> of the exception element in my 'struts-config.xml'. Once I have been
> >> forwarded to the correct view, I cannot display the error message using
> >> <html:errors></html:errors>. Does anyone know why?
> >>
> >> I have the validate attribute of the action element set to false in my
> >> 'struts-config.xml' and this is the only way that I have been able to
> >> make declarative exception handling work with the Struts Validator. If I
> >> set the validate attribute to true, declarative exception handling does
> >> not work and I am forwarded to the view specified in the input attribute
> >> of my action element. In this case however, <html:errors></html:errors>
> >> does display the error placed in ActionErrors by the Struts Validator.
> >> Any help would be appreciated. Thank you.
> >>
> >> - Asad
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
> > ---------------------------------------------------------------------
> > 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
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message