File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Authontication module not properly working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Authontication module not properly working" Watch "Authontication module not properly working" New topic
Author

Authontication module not properly working

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 751
Hi in my web application,

I have one check.jsp as bellow.

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

index.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 ]

Jigar Naik


Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39551
    
  27
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.


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Authontication module not properly working
 
Similar Threads
How to make MVC controller servlet the "default page"
JCaptcha and Struts problem
Interesting problem in Forwarding request dispatcher
Logging out issue
JSP Logout