Re: [jetty-user] Create a session from an existing one

Jan Bartel <[email protected]> Thu, 19 Jun 2014 20:40:03 +0200
Newsgroups gmane.comp.java.jetty.support
Message-ID <CALg=VpjTP0iV425c=t+g_YEBbtE5bAQi7CxPgg8eGz4rpxdBzg@mail.gmail.com>
Hi Silvio,

I don't really understand what you're trying to do either. Can you
explain a bit more?

thanks
Jan

On 19 June 2014 17:44, Joakim Erdfelt <[email protected]> wrote:
> I don't understand what you are attempting to do?
>
> Are you wanting a new Session object based on a request?
> If so, why not invalidate the current one, and make a new one via the
> servlet api?
>
>    Session currentSess = req.getSession();
>    if ( currentSess != null ) {
>       currentSess.invalidate();
>    }
>    Session newSess = req.getSession(true);
>
>
>
> --
> Joakim Erdfelt <[email protected]>
> webtide.com - intalio.com/jetty
> Expert advice, services and support from from the Jetty & CometD experts
> eclipse.org/jetty - cometd.org
>
>
> On Thu, Jun 19, 2014 at 1:05 AM, Silvio Bierman
> <[email protected]> wrote:
>>
>> Hello all,
>>
>> I know the servlet API does not allow this but I would like to know if
>> Jetty (embedded) somehow allows creating a new session (obtaining its
>> Session object) when I already have a session attached to the current
>> request.
>>
>> I am using URL based session tracking and need to provide a URL that will
>> land in the new session.
>>
>> Is there a way to work with the session manager or so to achieve this?
>>
>> Currently on Jetty 9.2.1.v20140609 using it in embedded mode.
>>
>> Thanks,
>>
>> Silvio
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>



-- 
Jan Bartel <[email protected]>
www.webtide.com
'Expert Jetty/CometD developer,production,operations advice'