You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by NateRedding <na...@netscape.net> on 2007/12/15 05:14:36 UTC

Session.invalidate()

Hello, 

I am writing a web application that has a need to log the user out when a
certain action is performed. So, I do a Session.invalidate(). This takes me
to the Page Expired Error Page that I set in my application settings.
However, when this particular action is performed, I simply want to take the
user to a different page other than the Page Expired Error Page that does
not require the user to be authenticated. Any recommendations on how to
accomplish this?

Thanks,
Nathan
-- 
View this message in context: http://www.nabble.com/Session.invalidate%28%29-tp14345242p14345242.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Session.invalidate()

Posted by Eelco Hillenius <ee...@gmail.com>.
> Cool, thanks! As you can probably tell, I am new to Wicket, and haven't quite
> figured out all its nuances yet! So far, I love it though! Is there a good
> article about nuances such as the difference between
> setResponsePage(MyPage.class) and setResponsePage(new MyPage()) and/or one
> that explains the request cycle in depth?

I think Wicket In Action talks about that in detail.

setResponsePage(MyPage.class) results in Wicket redirecting to the
bookmarkable URL to MyPage so that after the redirect a page instance
is created.

SetResponsePage(MyPage()) makes Wicket handle the request directly
using the instance you provide (rather than redirecting to a
bookmarkable URL).

Eelco

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Session.invalidate()

Posted by NateRedding <na...@netscape.net>.
Cool, thanks! As you can probably tell, I am new to Wicket, and haven't quite
figured out all its nuances yet! So far, I love it though! Is there a good
article about nuances such as the difference between
setResponsePage(MyPage.class) and setResponsePage(new MyPage()) and/or one
that explains the request cycle in depth?

Thanks!
Nathan


igor.vaynberg wrote:
> 
> right, i meant to say setresponsepage(mypage.class) :)
> 
> -igor
> 
> 
> On Dec 15, 2007 3:30 PM, Johan Compagner <jc...@gmail.com> wrote:
>> Wont that just result in page expire??
>>
>> Session.invalidat() doesnt invalidate at that time but at  the end of
>> the request
>>
>> I see 2 options
>>
>> Session.invalidat()
>> setResponsePage(new mypage());
>> setRedirect(false)
>>
>> Or
>> Session.invalidat()
>> setResponsePage(mypage.class);
>> setRedirect(true)
>>
>>
>>
>> On 12/15/07, Igor Vaynberg <ig...@gmail.com> wrote:
>> > session.invalidate();
>> > setresponsepage(new mypage());
>> > requestcycle.setredirect(true); <===
>> >
>> > -igor
>> >
>> >
>> > On Dec 14, 2007 8:14 PM, NateRedding <na...@netscape.net> wrote:
>> > >
>> > > Hello,
>> > >
>> > > I am writing a web application that has a need to log the user out
>> when a
>> > > certain action is performed. So, I do a Session.invalidate(). This
>> takes
>> > me
>> > > to the Page Expired Error Page that I set in my application settings.
>> > > However, when this particular action is performed, I simply want to
>> take
>> > the
>> > > user to a different page other than the Page Expired Error Page that
>> does
>> > > not require the user to be authenticated. Any recommendations on how
>> to
>> > > accomplish this?
>> > >
>> > > Thanks,
>> > > Nathan
>> > > --
>> > > View this message in context:
>> > http://www.nabble.com/Session.invalidate%28%29-tp14345242p14345242.html
>> > > Sent from the Wicket - User mailing list archive at Nabble.com.
>> > >
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> > > For additional commands, e-mail: users-help@wicket.apache.org
>> > >
>> > >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> > For additional commands, e-mail: users-help@wicket.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Session.invalidate%28%29-tp14345242p14365139.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Session.invalidate()

Posted by Igor Vaynberg <ig...@gmail.com>.
right, i meant to say setresponsepage(mypage.class) :)

-igor


On Dec 15, 2007 3:30 PM, Johan Compagner <jc...@gmail.com> wrote:
> Wont that just result in page expire??
>
> Session.invalidat() doesnt invalidate at that time but at  the end of
> the request
>
> I see 2 options
>
> Session.invalidat()
> setResponsePage(new mypage());
> setRedirect(false)
>
> Or
> Session.invalidat()
> setResponsePage(mypage.class);
> setRedirect(true)
>
>
>
> On 12/15/07, Igor Vaynberg <ig...@gmail.com> wrote:
> > session.invalidate();
> > setresponsepage(new mypage());
> > requestcycle.setredirect(true); <===
> >
> > -igor
> >
> >
> > On Dec 14, 2007 8:14 PM, NateRedding <na...@netscape.net> wrote:
> > >
> > > Hello,
> > >
> > > I am writing a web application that has a need to log the user out when a
> > > certain action is performed. So, I do a Session.invalidate(). This takes
> > me
> > > to the Page Expired Error Page that I set in my application settings.
> > > However, when this particular action is performed, I simply want to take
> > the
> > > user to a different page other than the Page Expired Error Page that does
> > > not require the user to be authenticated. Any recommendations on how to
> > > accomplish this?
> > >
> > > Thanks,
> > > Nathan
> > > --
> > > View this message in context:
> > http://www.nabble.com/Session.invalidate%28%29-tp14345242p14345242.html
> > > Sent from the Wicket - User mailing list archive at Nabble.com.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Session.invalidate()

Posted by Johan Compagner <jc...@gmail.com>.
Wont that just result in page expire??

Session.invalidat() doesnt invalidate at that time but at  the end of
the request

I see 2 options

Session.invalidat()
setResponsePage(new mypage());
setRedirect(false)

Or
Session.invalidat()
setResponsePage(mypage.class);
setRedirect(true)


On 12/15/07, Igor Vaynberg <ig...@gmail.com> wrote:
> session.invalidate();
> setresponsepage(new mypage());
> requestcycle.setredirect(true); <===
>
> -igor
>
>
> On Dec 14, 2007 8:14 PM, NateRedding <na...@netscape.net> wrote:
> >
> > Hello,
> >
> > I am writing a web application that has a need to log the user out when a
> > certain action is performed. So, I do a Session.invalidate(). This takes
> me
> > to the Page Expired Error Page that I set in my application settings.
> > However, when this particular action is performed, I simply want to take
> the
> > user to a different page other than the Page Expired Error Page that does
> > not require the user to be authenticated. Any recommendations on how to
> > accomplish this?
> >
> > Thanks,
> > Nathan
> > --
> > View this message in context:
> http://www.nabble.com/Session.invalidate%28%29-tp14345242p14345242.html
> > Sent from the Wicket - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Session.invalidate()

Posted by Igor Vaynberg <ig...@gmail.com>.
session.invalidate();
setresponsepage(new mypage());
requestcycle.setredirect(true); <===

-igor


On Dec 14, 2007 8:14 PM, NateRedding <na...@netscape.net> wrote:
>
> Hello,
>
> I am writing a web application that has a need to log the user out when a
> certain action is performed. So, I do a Session.invalidate(). This takes me
> to the Page Expired Error Page that I set in my application settings.
> However, when this particular action is performed, I simply want to take the
> user to a different page other than the Page Expired Error Page that does
> not require the user to be authenticated. Any recommendations on how to
> accomplish this?
>
> Thanks,
> Nathan
> --
> View this message in context: http://www.nabble.com/Session.invalidate%28%29-tp14345242p14345242.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org