Thank you for the reply Robert,

Because saveErrors() signature requires the request object I assume that 
the errors object have a request scope and I'm dealing with that 
appropriately.

For the time being your solution is the one I'l have to use (which have 
already been using) but to be consistant and reduce the amount of code I 
have to write it would be preferable to use the errors tag *sad day :(

Just so you know a similar problem exists for multipart/form-data 
posts/requests, they also can not be forwarded through multiple 
Action's.  Though this may have been changed (I'm still using struts 1.01).

Rob


Robert Taylor wrote:
> I don't have a direct answer for you Rob, but what we did was to create a
> custom tag that looks for errors in all scopes. Once it is rendered, then it
> removes it from all scopes. This allows me to propogate error from page X to
> page J by placing them in the session scope. There may be some caveats, but
> it has worked pretty well so far.
> 
> We are migrating to Struts now and in doing so are starting to use the
> <html:errors/> tag as well and have run into the same issue you describe.
> Maybe it, (<html:errors/>) could be customized so that it supports the
> transitive functionality you and most likely others need. Maybe have an
> attribute that defines the scope in which the errors may reside <html:errors
> scope="[application, session, request, page, all]" /> with the default being
> the request scope.
> 
> Once again, sorry for not providing a direct answer, but maybe the ideas
> presented above will help.
> 
> robert
> 
> 
>>-----Original Message-----
>>From: rob [mailto:[EMAIL PROTECTED]]
>>Sent: Tuesday, April 16, 2002 11:22 AM
>>To: [EMAIL PROTECTED]
>>Subject: <html:errors /> ActionErrors bug.
>>
>>
>>It would appear that you can not maintain saved errors in the http
>>request across a forward to an action before displaying it on a .jsp page.
>>
>>The following diagram helps to illustrate:
>>X - action 1
>>Y - action 2
>>J - view (jsp page)
>>
>>X -> Y -> J
>>
>>If an ActionErrors instance is created, an ActionError instance is added
>>to it and then is saved into the request using saveErrors(request,
>>errors) in Action X and then Action X forwards the request to Action Y
>>which does something else (not related to errors) and then is forwarded
>>to the jsp page J where there is an <html:errors /> tag the errors no
>>longer exist and are lost at this point so far as I can tell.
>>
>>If the action X forwards directly to page J this does not happen the
>>errors are delivered successfully and displayed.
>>
>>Can anyone tell me a way around this?  It really sucks especially if
>>your using an Action to direct requests to dynamic views.
>>
>>Thanks
>>
>>
>>
>>--
>>To unsubscribe, e-mail:
>><mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail:
>><mailto:[EMAIL PROTECTED]>
>>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to