redirect after logging in

View: New views
4 Messages — Rating Filter:   Alert me  

redirect after logging in

by Jaarthy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm trying to implement a scenario in which if the user who has not logged
in clicks on a page "for logged in users only"  should be
redirected to "login page", and then after logging in he should be redirected to the page he originally requested for.

I need to implement this in struts2.Can I achieve this using Interceptors?Kindly help.

Thanks,
Aarthy

Re: redirect after logging in

by Jim Kiley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I wouldn't implement it with interceptors so much as I'd look into something
like Acegi Security (now Spring Security if I remember right).  I'm having a
decent level of success on an Acegi / Sitemesh / Struts 2 / Spring /
Hibernate project right now.

jk

On Fri, May 9, 2008 at 6:01 PM, Jaarthy <aarthyjava@...> wrote:

>
> Hi,
>
> I'm trying to implement a scenario in which if the user who has not logged
> in clicks on a page "for logged in users only"  should be
> redirected to "login page", and then after logging in he should be
> redirected to the page he originally requested for.
>
> I need to implement this in struts2.Can I achieve this using
> Interceptors?Kindly help.
>
> Thanks,
> Aarthy
>
> --
> View this message in context:
> http://www.nabble.com/redirect-after-logging-in-tp17157183p17157183.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...
>
>


--
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com

Re: redirect after logging in

by Laurie Harper :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Acegi / Spring Security can certainly get this done, but may be overkill
if the authentication and authorization requirements are simple.
Container Managed Security is probably the quickest and easiest way to
get the described behaviour, but that also doesn't always fit. For a
home-brewed custom solution a Struts2 interceptor or simply a servlet
filter will give more flexibility.

So, the answer is yes, this can be achieved using interceptors. What
specifically do you need help with?

L.

Jim Kiley wrote:

> I wouldn't implement it with interceptors so much as I'd look into something
> like Acegi Security (now Spring Security if I remember right).  I'm having a
> decent level of success on an Acegi / Sitemesh / Struts 2 / Spring /
> Hibernate project right now.
>
> jk
>
> On Fri, May 9, 2008 at 6:01 PM, Jaarthy <aarthyjava@...> wrote:
>
>> Hi,
>>
>> I'm trying to implement a scenario in which if the user who has not logged
>> in clicks on a page "for logged in users only"  should be
>> redirected to "login page", and then after logging in he should be
>> redirected to the page he originally requested for.
>>
>> I need to implement this in struts2.Can I achieve this using
>> Interceptors?Kindly help.
>>
>> Thanks,
>> Aarthy
>>
>> --
>> View this message in context:
>> http://www.nabble.com/redirect-after-logging-in-tp17157183p17157183.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@...
>> For additional commands, e-mail: user-help@...
>>
>>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


Re: redirect after logging in

by Rushikesh Thakkar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Check out the login-interceptor in Mail-Reader application given on Planet
Struts. I found it useful. I think you are also looking for the same.
http://www.planetstruts.org/struts2-mailreader/Tour.do

(The application may be down sometimes, you can refer to cached pages in
Google search for the same.)

-Rushikesh

On Mon, May 12, 2008 at 1:35 PM, Laurie Harper <laurie@...> wrote:

> Acegi / Spring Security can certainly get this done, but may be overkill
> if the authentication and authorization requirements are simple. Container
> Managed Security is probably the quickest and easiest way to get the
> described behaviour, but that also doesn't always fit. For a home-brewed
> custom solution a Struts2 interceptor or simply a servlet filter will give
> more flexibility.
>
> So, the answer is yes, this can be achieved using interceptors. What
> specifically do you need help with?
>
> L.
>
>
> Jim Kiley wrote:
>
> > I wouldn't implement it with interceptors so much as I'd look into
> > something
> > like Acegi Security (now Spring Security if I remember right).  I'm
> > having a
> > decent level of success on an Acegi / Sitemesh / Struts 2 / Spring /
> > Hibernate project right now.
> >
> > jk
> >
> > On Fri, May 9, 2008 at 6:01 PM, Jaarthy <aarthyjava@...> wrote:
> >
> >  Hi,
> > >
> > > I'm trying to implement a scenario in which if the user who has not
> > > logged
> > > in clicks on a page "for logged in users only"  should be
> > > redirected to "login page", and then after logging in he should be
> > > redirected to the page he originally requested for.
> > >
> > > I need to implement this in struts2.Can I achieve this using
> > > Interceptors?Kindly help.
> > >
> > > Thanks,
> > > Aarthy
> > >
> > > --
> > > View this message in context:
> > >
> > > http://www.nabble.com/redirect-after-logging-in-tp17157183p17157183.html
> > > Sent from the Struts - User mailing list archive at Nabble.com.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@...
> > > For additional commands, e-mail: user-help@...
> > >
> > >
> > >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...
>
>
LightInTheBox - Buy quality products at wholesale price