which checks for session id, if the session id is invalid the page is redirected to index.jsp and i have included this check.jsp in my every jsp page.which checks if the session id is same ot noy when user had logged in
my 1st jsp
which takes username and password. if both are valid than execute the following code which is in my servlet
the code binds a session id in a session variable. and than the page get forwarded to report.jsp
The code in report.jsp
report.jsp which has the list of reports. user selects the report which he want and click ok
than report get displayed in html form in next page htmlReport.jsp. htmlReport.jsp
but when the user is on htmlReport.jsp and press Back button of browser. index.jsp apears that is my login form. The ideally there should be report.jsp as the user is valid.
i tried to debug the code but but when the user click back button of the browser check.jsp doesnt even get executed. which should.
[ June 20, 2007: Message edited by: Jigar Naik ] [ June 20, 2007: Message edited by: Bear Bibeault ]
when the user click back button of the browser check.jsp doesnt even get executed. which should.
It's debatable if the browser should access the server after clicking the Back button. But what all browsers do is that they are simply re-displaying a cached copy of the page that was shown before the current one.
But users generally understand that, and if the Back button took them back to the login page one too many times, they'll switch to using the navigation links you provide on the page.
By the way, I'd advise you not to do things like session handling in JSPs. That's what servlets and backing beans are for, which makes for much more maintainable code.