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 some
functionality on it (e.g. logout and giving a keep-alive signal to the
wicket app) only if the cookie is there, now IF i dont set the cookie in the
same response, the user might not send the next request to the wicket app,
and instead trigger a use-case part of the external app, and its for this
scenario where i want the cookie to be attached in the same response.



Johan Compagner wrote:
> 
> 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 previos request because of that you then test if
> you find your cookie. If that isnt there you know it is the first time
> and set the cookie, the next time the cookie is set so nothing
> happens..
> 
> On 4/29/08, mfs <[EMAIL PROTECTED]> wrote:
>>
>> 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 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 particular request, this would
>> just
>> >> >> tell
>> >> >> me if the session reference is still temperary...
>> >> >>
>> >> >> public final boolean isTemporary()
>> >> >> {
>> >> >>                return getId() == null;
>> >> >> }
>> >> >>
>> >> >>
>> >> >>
>> >> >> Mr Mean wrote:
>> >> >> >
>> >> >> > 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 response. I need to set another cookie alongside
>> >> >> JSESSION
>> >> >> >> id
>> >> >> >>  in the same request.
>> >> >> >>
>> >> >> >>  Any pointers..?
>> >> >> >>  --
>> >> >> >>  View this message in context:
>> >> >> >>
>> >> >>
>> >>
>> http://www.nabble.com/Session.isNew---Check-if-a-%28permanent%29-session-was-created-in-the-given-request-tp16952899p16952899.html
>> >> >> >>  Sent from the Wicket - User mailing list archive at Nabble.com.
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> ---------------------------------------------------------------------
>> >> >> >>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> >> >>  For additional commands, e-mail: [EMAIL PROTECTED]
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> ---------------------------------------------------------------------
>> >> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> >> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >>
>> http://www.nabble.com/Session.isNew---Check-if-a-%28permanent%29-session-was-created-in-the-given-request-tp16952899p16965541.html
>> >> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >>
>> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >> >>
>> >> >>
>> >> >
>> >> > --
>> >> > Sent from Gmail for mobile | mobile.google.com
>> >> >
>> >> >
>> ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Session.isNew---Check-if-a-%28permanent%29-session-was-created-in-the-given-request-tp16952899p16969659.html
>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Session.isNew---Check-if-a-%28permanent%29-session-was-created-in-the-given-request-tp16952899p16969778.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Session.isNew---Check-if-a-%28permanent%29-session-was-created-in-the-given-request-tp16952899p16970405.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to