Re: Session.isNew - Check if a (permanent) session was created in the given request

2008-04-29 Thread Johan Compagner
With the way i described it will happen in exactly the same response! On 4/29/08, mfs <[EMAIL PROTECTED]> wrote: > > Sure it makes sense, but there is a reason that i want to set the cookie in > exactly the same request/response cycle, the cookie i am setting would be > used by this external mod_p

Re: Session.isNew - Check if a (permanent) session was created in the given request

2008-04-29 Thread mfs
Initially i had kind of a hack where i was checking the response headers using HttpResponse.containsHeader("Set-Cookie") in RequestCycle.onEndRequest() and set my cookie if it returns true, this worked perfectly fine in jetty but in oc4j for some odd reasons i dont have these response headers avai

Re: Session.isNew - Check if a (permanent) session was created in the given request

2008-04-29 Thread mfs
Sure it makes sense, but there is a reason that i want to set the cookie in exactly the same request/response cycle, the cookie i am setting would be used by this external mod_plsql application (i am integrating my wicket app with) to check if an http/wicket session exists, the external app bases

Re: Session.isNew - Check if a (permanent) session was created in the given request

2008-04-29 Thread Johan Compagner
Look for once what i test!! You want this the first time a session is created set a cookie. So TEST the isTemp() method of the session. (in RequestCycle.onEndRequest()) then if that returns false then you know the session is created when you dont know yet, it could be this request but also a prev

Re: Session.isNew - Check if a (permanent) session was created in the given request

2008-04-29 Thread mfs
It wouldnt be there,remember i want to set the cookie in the same response as the JSESSIONID cookie.. Johan Compagner wrote: > > Get the cookie from the request??? > > On 4/29/08, mfs <[EMAIL PROTECTED]> wrote: >> >> and how i would check if the cookie is not set ? >> >> >> >> Johan Compagner

Re: Session.isNew - Check if a (permanent) session was created in the given request

2008-04-29 Thread Johan Compagner
Get the cookie from the request??? On 4/29/08, mfs <[EMAIL PROTECTED]> wrote: > > and how i would check if the cookie is not set ? > > > > Johan Compagner wrote: > > > > If(!session.isTemp() && cookieNotSet) setCookie() > > > > On 4/29/08, mfs <[EMAIL PROTECTED]> wrote: > >> > >> Doesnt really giv

Re: Session.isNew - Check if a (permanent) session was created in the given request

2008-04-29 Thread mfs
and how i would check if the cookie is not set ? Johan Compagner wrote: > > If(!session.isTemp() && cookieNotSet) setCookie() > > On 4/29/08, mfs <[EMAIL PROTECTED]> wrote: >> >> Doesnt really give what i need (looking at the src), i want to know if a >> permanent session was created in a pa

Re: Session.isNew - Check if a (permanent) session was created in the given request

2008-04-29 Thread Johan Compagner
If(!session.isTemp() && cookieNotSet) setCookie() On 4/29/08, mfs <[EMAIL PROTECTED]> wrote: > > Doesnt really give what i need (looking at the src), i want to know if a > permanent session was created in a particular request, this would just tell > me if the session reference is still temperary..

Re: Session.isNew - Check if a (permanent) session was created in the given request

2008-04-29 Thread mfs
Doesnt really give what i need (looking at the src), i want to know if a permanent session was created in a particular request, this would just tell me if the session reference is still temperary... public final boolean isTemporary() { return getId() == null; } Mr Mean wrote: >

Re: Session.isNew - Check if a (permanent) session was created in the given request

2008-04-28 Thread Maurice Marrink
Session.isTemporary(); Maurice On Tue, Apr 29, 2008 at 6:14 AM, mfs <[EMAIL PROTECTED]> wrote: > > Hello Everyone, > > Is there a way to check if a (permanent) session was created in the given > request, in other words want to know if a JSESSIONID cookie is being set in > the resulting respon

Session.isNew - Check if a (permanent) session was created in the given request

2008-04-28 Thread mfs
Hello Everyone, Is there a way to check if a (permanent) session was created in the given request, in other words want to know if a JSESSIONID cookie is being set in the resulting response. I need to set another cookie alongside JSESSION id in the same request. Any pointers..? -- View this mess