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

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

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
Posts: 6663
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
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!