aspose file tools
The moose likes Portals and Portlets and the fly likes clearing the content of portletsession Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Portals and Portlets
Reply Bookmark "clearing the content of portletsession" Watch "clearing the content of portletsession" New topic
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: clearing the content of portletsession
 
Similar Threads
Websphere Portal NullPointerException
Migrating from WPS 6.0 to 6.1 - API related problem.txt
Parameter passing from one app (EAR) to another EAR
Doubt in JSP working with Netscape4.76?
PortletSession and duplicate portlets