File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes HttpSession data to be cleared reg. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "HttpSession data to be cleared reg." Watch "HttpSession data to be cleared reg." New topic

HttpSession data to be cleared reg.

gan chan

Joined: Dec 21, 2000
Posts: 5
We are using WebSphere App server & VAJava. We are accessing several content files(XML)and storing in the session data which is a HttpSession object. We would like to clear the session data. So as to retrieve new content changes.
Shutting Down WebSphere App. Server is a solution. But any alternative using a servlet or so. Please suggest us.
Ganesh & Arun
Brett Knapik
Ranch Hand

Joined: Oct 15, 2000
Posts: 255
why would you need to do that? it clears when the session is over or maybe you can over-write it i do not know.
I wish there was a button on my monitor to turn up the intellegince.
Theres a button called 'brightness' but it doesn't work

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
If you want to clear the whole session just use

maha anna
[This message has been edited by maha anna (edited December 22, 2000).]
Satish Kasala

Joined: Dec 19, 2000
Posts: 16
Hi ganesh,
A little addition to what maha anna said.
Be sure to check for the null of userSessionRef variable before you call the invalidate() method. Because if the session does not already exist it would be null and a call to invalidate() method might throw up a null pointer exception.
my 2 cents worth
I agree. Here's the link:
subject: HttpSession data to be cleared reg.
jQuery in Action, 3rd edition