You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by aepelde <ae...@gmail.com> on 2008/10/26 17:21:46 UTC

Session ID

I'have implemented a custom MySession session object and create an instance
when my application's newSession method is called. Something simple like
this:

public Session newSession(Request request, Response response) {    	
	MySession session = new MySession(request);
}

Now I need to get this session's ID, but I don't know how to do it. Any
idea?

-- 
View this message in context: http://www.nabble.com/Session-ID-tp20175225p20175225.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 ID

Posted by aditsu <ad...@yahoo.com>.


aepelde wrote:
> 
> I'have implemented a custom MySession session object and create an
> instance when my application's newSession method is called. Something
> simple like this:
> 
> public Session newSession(Request request, Response response) {    	
> 	MySession session = new MySession(request);
> }
> 
> Now I need to get this session's ID, but I don't know how to do it. Any
> idea?
> 
> 

You could call session.getId(). That will return null if there's not actual
web session associated; if you want to force using a web session, call
session.bind() first.

Adrian
-- 
View this message in context: http://www.nabble.com/Session-ID-tp20175225p20175821.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 ID

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Hi!

I am not sure, but you could try

WebPage.getWebRequestCycle().getWebSession().getId()

**
Martin

2008/10/26 aepelde <ae...@gmail.com>:
>
> I'have implemented a custom MySession session object and create an instance
> when my application's newSession method is called. Something simple like
> this:
>
> public Session newSession(Request request, Response response) {
>        MySession session = new MySession(request);
> }
>
> Now I need to get this session's ID, but I don't know how to do it. Any
> idea?
>
> --
> View this message in context: http://www.nabble.com/Session-ID-tp20175225p20175225.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