struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maurizio Cucchiara <>
Subject Re: Problem with Validation "lifecycle"
Date Fri, 19 Nov 2010 16:28:35 GMT
As far I can remember actionError are stored in struts stack, so I guess
they are per-request.
Also, redirect action create a new request, so you can share AE in a
standard flow.
Can't you do without redirect for the input result?

2010/11/19 Greg Akins <>

> I've written an action, with validation, that uses a redirectAction
> instead of a .jsp for the INPUT result.
> When the final INPUT jsp is displayed, the actionErrors aren't
> present.  I believe this is because the action I'm redirecting to
> "clears" the actions before the jsp is displayed.  If I save an
> actionError on the session, I can retrieve it in the final error...
> but this seems less than ideal, and I'm not sure how to get to the
> annotation based validators ( I added a session.put() in the
> validate() method.
> Is there a way to "carry" the errors across actions in this case? The
> INPUT needs to redirect to an action because the action determines
> whether certain fields need displayed.. if the INPUT goes straight to
> a jsp, the jsp is blank because of the logic I'm using to display
> fields.
> Struts 2.2.1
> --
> Greg Akins
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Maurizio Cucchiara

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message