So would it be my best bet to follow http://husted.com/struts/tips/017.html?

Jim Barrows wrote:

-----Original Message-----
From: Tom Kane [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 11, 2004 11:38 AM
To: [EMAIL PROTECTED]
Subject: RE: <html:errors />




-----Original Message-----
From: Laran Evans [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 11, 2004 10:08 AM
To: Struts User Mailing List
Subject: <html:errors />




One main difference between the method in the archive and my method is that
I put the "errors" object into the session instead of the request. The
reason is that all my actions redirect to their respective .jsp pages to
avoid the user re-running an action simply by refreshing the page (e.g. a
'create' action). I think that anything stored in the request is lost by
the time the action is redirected. I put "errors" in the session instead.
One problem with this is that the "errors" object remains in the session so
any subsequent visits to the page display errors. Since an error redirects
the user right back to the same page, I think I may remove the "errors"
object from the session as soon as the form is submitted.


My questions are:

1) Do I need to put "errors" in the session so that it survives the
redirection long enough to be displayed?



More then likely.. try it and see. You're reasons for redirection kind of bother me.. I've never run into a situation where a refresh submits a form twice, but then again I haven't run into every situation.



2) Do I need to use <c:out> inside an <html:messages> tag to output
messages? Is it the only way?



Nope, you can use <bean:write




3) Is it considered bad form to use ActionErrors? I don't want to build
dependencies on soon-to-be-deprecated stuff.



Depends... for struts 1.1 no, for struts 1.2 yes. If you're planning on migrating soon... up to you.



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



Reply via email to