I’m working on a web application using JSP/Servlets, etc. And I have a lot of form progression. I am aware of some ways to use the “Back” functionality, but I am not sure if its efficient enough.
What are the best ways to implement this? Does it Involve using the session object? or just the request? or neither?
If you don’t have any particular reason, why don’t you use javascript to do this?
You can refer to some other ways to do it in javascript: http://www.comptechdoc.org/independent/web/cgi/javamanual/javahistory.html
The reason it’s cool is that you don’t have to handle this piece of “back” code in your server. You let browsers handle it for you.
If you insist in doing so in plain java, I think session is the best way to do it. If you would like to remember the whole path, all you have to do it to store an
Stackin your session, and name it history or something alike. You pop out one URL whenever the user click back, and push an URL when the user click into a new URL.