File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes how to handle browser back button in jsf application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "how to handle browser back button in jsf application" Watch "how to handle browser back button in jsf application" New topic
Author

how to handle browser back button in jsf application

rashmi coorg
Greenhorn

Joined: Jul 11, 2011
Posts: 19
i am using richfaces3 in my web application. the problem I'm facing here is.. if the user has visited some other site like Google.com and visits my application, logs into my application, he is redirected to home page. Now if the user clicks back button he will be redirected to the previous page that is Google.com. And if the user clicks the forward button the user is directly taken to home page, without asking him to login. I am not changing the URL my app even if i am redirecting to other pages in my application. I want to force the user to login in this scenario. how can this be achieved ? please give me your suggestions.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Goes to the homepage because the user still has an active session. There is no way to kill the session when the user goes to another site.

Eric
rashmi coorg
Greenhorn

Joined: Jul 11, 2011
Posts: 19
if we can capture the event when browser back button is clicked.. may be we can kill the session on occurrence of that event.. can you suggest me if this can be done.. and if it can be done.. how can we capture the event?
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 594
    
    4

rashmi coorg wrote:if we can capture the event when browser back button is clicked.. may be we can kill the session on occurrence of that event..

Say, user logs in, goes to home page and goes to some other page, in the same application, now if (s)he clicks back, what happens?
rashmi coorg
Greenhorn

Joined: Jul 11, 2011
Posts: 19
Prasad Krishnegowda wrote:
Say, user logs in, goes to home page and goes to some other page, in the same application, now if (s)he clicks back, what happens?



Within my application the back button is disabled. But when i navigate outside my application. i am facing this problem. The url of the app doesnot change when i navigate from one page to another within the application.
Any suggestions..??
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to handle browser back button in jsf application