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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.