On Wed, 28 Mar 2001, Joel Shellman wrote:
> I don't quite understand the the below quote from the example tour. The
> paragraph doesn't make sense. Anything in request scope will be removed
> after the request is over automatically. So there's no need to remove it
> just so if the user comes back later to the same page--it would have
> been long gone before then. Right? What is it talking about?
>
In early versions of Struts, form beans could only be stored in session
scope, so the Actions were programmed to remove those beans as soon as
they were no longer needed. Once the support for using request scope was
added, the example app was changed so that it will work correctly for
*either* scope (request or session) for form beans.
You are correct that the removeAttribute call is not required for request
scope, but it doesn't hurt anything either -- and it is part of
maintaining the compatibility so that this code will still work for
session scope form beans.
Craig