• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Redirecting user to Login page & then resuming on the same page

Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am currently using Spring MVC in conjunction with JSR168 Portlets. So the view in this case is JSR-168 portlet.
I am developing this JSR-168 portlet to be rendered.
On receiving a request in my SpringController class I check if user credentials are available.
If yes I proceed with the rendering of the JSR 168 portlet page.

But suppose the user is not logged in, I want to redirect the user to the login page where in if the user
is a registered user when he enters his credentials the user should resume on the page(ie.JSR168 portlet page)
which he was trying to access but could not because of invalid credentials.

Also in the login page there is a register link. So in case the user is not registered I want the user
to register & be redirected to the same page which he was trying to access at the onset that being the JSR168 portlet page.

I am kind of new to Spring.
Do i have to take care of this at the Login & register pages or do I need to do something at
the JSR portlet page I am developing.
Is it that i need to pass the reference of the URL to the login & register page so when the user
actually logs in they get redirected to the required URL (i.e.the JSR 168 portlet page I am developing)

Kindly post your suggestions on how do I go about implementing the same.


    Bookmark Topic Watch Topic
  • New Topic