• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

How to redirect user to the page/link where he was before session expire ?  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pros,

Let me explain my problem with the help of following steps.

1. User logs in to the system to see the default main page.
2. He browses through the application, at some point he reaches pageX( There is a link on pageX say linkY).
3. He goes away for some time. His session on server expires in the meantime
4. When he comes back and clicks on linkY of pageX, system redirects him to the login page.
5. Once logged in what he sees is default main page and not desired pageY of linkY

Is there any way I can do this without losing session status of the user when he was on pageY ?

Thanks in advance,
Abhijit Salunkhe
 
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you implement declarative security for the web app this should happen automatically. The user will be redirected to the page he wanted to see on his next login attempt (when the session expires). Have a look at the auth constrain, web resource collection, security role and related elements in web.xml
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!