On Thursday 14 February 2002 10:47 am, you wrote:

> I have a Turbine app which logs in a user, and then creates displays a
> page with a link to a non-Turbine servlet I've written.  When the user
> receives this page, the Turbine cookie is set.
>
> When the user clicks to the non-Turbine servlet, I can grab the
> Turbine session cookie in my servlet, but then I want to ask Turbine
> if it's still a valid session.  Can anyone suggest a Turbine call
> where I can do this?
>
> I'd expect to be able to call something like
>
>   boolean isValidTurbineSessionCookie(Cookie cookie)
>
> and have Turbine check its session info for that cookie, and be able
> to return true/false, perhaps even an entire User object for a valid
> session. Any ideas?

Turbine uses the standard HttpSession interface from the servlet api, and 
these sessions are managed by your servlet container.  You can get access to 
the session in your custom servlet by calling request.getSession() as per 
normal.

You should then be able to get the User object from the session like this:

User user = (User) session.getAttribute(User.SESSION_KEY);

Regards,

-- Rodney

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

Reply via email to