Link to home
Start Free TrialLog in
Avatar of na77
na77

asked on

clear session history and display the page again

I have a jsp page (out.jsp) wich contains a form with submit button. When "submit" is clicked, out.jsp calls a java servlet (controller.java) which then performs some operations and the results are again displayed by out.jsp. I track session history with HttpSession(inside controller.java) and display it each time "submit" button is pressed. In other words, I display all previous paramters the user selected. I need to create a "clear history" button. I guess I can try to use session.removeAttribute inside the servlet but I don't know how I would know which button was pressed (submit or clear?)

So, my question is in which file (out.jsp or controller.java) and how  I would create a function for clearing history, so that out.jsp is displayed again but without session history displayed.
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'm easy but I gave them the code required to kill the session so that's at least part of the solution...
I think I answered the question too.