File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes How can we remove ActionForm in session scope after finishing its use. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How can we remove ActionForm in session scope after finishing its use." Watch "How can we remove ActionForm in session scope after finishing its use." New topic
Author

How can we remove ActionForm in session scope after finishing its use.

Sandeep Awasthi
Ranch Hand

Joined: Oct 23, 2003
Posts: 597
Hi,

I have one ActionForm in session scope but its use is very limited. I want to know can I remove this ActionForm from session after user finish using it?
[ April 13, 2007: Message edited by: Rajesh Thakare ]

Sandeep
Jim Hardin
Ranch Hand

Joined: Aug 02, 2006
Posts: 46
Suppose your form bean is called "myFormBean" and is declared in your struts-config.xml like the following:
<form-bean name="myFormBean" type="com.javaranch.saloon.Whatever" />

Then the following would remove it from the session:

[ April 13, 2007: Message edited by: Jim Hardin ]
Sandeep Awasthi
Ranch Hand

Joined: Oct 23, 2003
Posts: 597
Thanks Jim
Jim Hardin
Ranch Hand

Joined: Aug 02, 2006
Posts: 46
You're welcome, Rajesh.
 
wood burning stoves
 
subject: How can we remove ActionForm in session scope after finishing its use.
 
Similar Threads
default scopes of form bean and data bean
availability of ActionForm object in two action classes.
multi-step user registration ?
Pass objects through form submit
DynaValidatorForm not redisplaying scoped variables