• 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:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

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
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!