clear session history and display the page again
Posted on 2004-11-14
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.