You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Markus Demetz <ne...@webeffects.it> on 2006/03/11 12:05:02 UTC
remove ActionForm from session
Hi all,
i have some ActionForms which I declared with a session scope. This because
I validate them over more steps.
After a completed task (i.e. registration) I would like to remove them to
keep session small.
is there a simple way to do that?
thanks!
markus
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: remove ActionForm from session
Posted by Ed Griebel <ed...@gmail.com>.
If you don't need to access it in your JSP page, you can do
'request.getSession().removeAttribute("myFormBean");'
If your JSP needs the form, at the end of the JSP page you can put
'<c:set var="myFormBean" value="${null}"/>'. You will have to include
the proper taglib as well, google "c:set" for more information.
-ed
On 3/11/06, Markus Demetz <ne...@webeffects.it> wrote:
> Hi all,
>
> i have some ActionForms which I declared with a session scope. This because
> I validate them over more steps.
>
> After a completed task (i.e. registration) I would like to remove them to
> keep session small.
>
> is there a simple way to do that?
>
> thanks!
> markus
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
"The greatest tyrannies are always perpetrated in the name of the
noblest causes." Thomas Paine
"Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety" - Benjamin
Franklin
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: remove ActionForm from session
Posted by Michael Jouravlev <jm...@gmail.com>.
On 3/11/06, Markus Demetz <ne...@webeffects.it> wrote:
> Hi all,
>
> i have some ActionForms which I declared with a session scope. This because
> I validate them over more steps.
>
> After a completed task (i.e. registration) I would like to remove them to
> keep session small.
>
> is there a simple way to do that?
ActionForm is just a Java object set in the session under a key that
you define in your <form-beans> section. You can remove it using that
key. Struts will recreate it when needed.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org