File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes Redirecting user to Login page & then resuming on the same page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Redirecting user to Login page & then resuming on the same page" Watch "Redirecting user to Login page & then resuming on the same page" New topic
Author

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

Udayan Kumar
Ranch Hand

Joined: Jan 16, 2007
Posts: 66
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.


Regards,

Uday
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Redirecting user to Login page & then resuming on the same page