This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
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 Head First Android this week in the Android 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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How can we remove ActionForm in session scope after finishing its use.
 
It's not a secret anymore!