Hi!

i just want to ask how to end a session after a transaction. Here's the flow of my app...after updating information in the database, a confirmation page is invoked, in this page, a button which will display the first page is displayed. when i click that button, the text box is empty however when i clicked another button the values in the session was still there and the textbox on that jsp page was populated.should i use sesion.invalidate() or removeAttribute() only on the last jsp page so that all the object in the session is cleaned up.

thanks in advance for your replies...:)

session.invalidate() - will remove all the objects session.removeAttribute(String name) - will remove only one object of given name

Question is: Do you keep in your session more then one objects?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.