| Author |
clearing the content of portletsession
|
manepalli rajesh
Greenhorn
Joined: Oct 19, 2008
Posts: 15
|
|
i have to persist the values entered in a jsp page, i used so many session attributes to store values in processaction of my method.
now i am able to persist in the jsp page. but problem is when user registered successfully, those values have to be removed in the textboxes. for this i want to clear the session . but i could not found any method of portletsession to clear the session(like httpsession clear method). please suggest me how to clear the content when userregistered succesfully.
|
 |
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Joined: Aug 26, 2006
Posts: 4967
|
|
You can get a list of all of the attributes in the session with a method such as getAttributeNames or something like that.
You can then loop through each attribute name and then call the removeAttribute method.
I can't remember the exact method names, but it's something like that. Get all the attributes, loop through them one at a time, and then call a remove on each attribute. Then you have nothing in your session.
-Cameron McKenzie
|
Author of Hibernate Made Easy, What is WebSphere???, JSF 2.0 Made Easy and the SCJA Certification Guides
|
 |
 |
|
|
subject: clearing the content of portletsession
|
|
|