It's not a secret anymore!
The moose likes Servlets and the fly likes Login Page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Login Page " Watch "Login Page " New topic

Login Page

Gaurav Bagha

Joined: Sep 20, 2011
Posts: 1
I want to create an application with a login page.But once the user enters his credentials and click on the button and a new page appears,he must not be able to go back to login page unless he logs out i.e back tab of browser must be disabled or something.How to do this?
ntumba lobo
Ranch Hand

Joined: Oct 21, 2008
Posts: 180
Basically you want to break a default browser behaviour (back button). It could be confusing for an end user.
After logining in successfully and being presented a new page, if the user presses the back button in the browser what should he see ? the same page again, a default home page ?

Anyway if you have to implement this feature the solution will depend on you have currently in place in your application in term of techno and authentication model.
But I think the HTTP session will have a role to play

Sushil Jamsandekar

Joined: Aug 11, 2008
Posts: 15
you can use intercepting filter to filter out the request. Check in session if user is logged in and prevent the request going to login page

SCJP 1.4
Preparing for SCWCD
I agree. Here's the link:
subject: Login Page
It's not a secret anymore!