You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Luda Balakireva <Lu...@envworld.com> on 2001/11/15 22:41:16 UTC

session time out

I need to implement some logic on session timeout event.
I tried to create object which implements HttpSessionBindingListener
interface. 
But if I include javax.servlet.http.* class , 
I can not use session object in <xsp:logic>
even like
String po = (String) request.getSession(true).getAttribute("co"); 

it gives error:
Explicit cast needed to convert org.apache.cocoon.environment.Session to
javax.servlet.http.HttpSession.
if I cast like  session = (HttpSession)request.getSession(true) it 
does not help.
How can I put my bind to listener object to Cocoon session?  
Thank you.



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: session time out

Posted by "Piroumian, Konstantin" <KP...@flagship.ru>.
Cocoon uses its own session class: org.apache.cocoon.environment.Session, so
you should simply use it exactly as if you were using the
javax.servlet.http.Session. Remove javax.servlet.http.* from imports and
everything must work (as I remember Cocoon's session class is imported
already)

Regards,
    Konstantin Piroumian

> I need to implement some logic on session timeout event.
> I tried to create object which implements HttpSessionBindingListener
> interface.
> But if I include javax.servlet.http.* class ,
> I can not use session object in <xsp:logic>
> even like
> String po = (String) request.getSession(true).getAttribute("co");
>
> it gives error:
> Explicit cast needed to convert org.apache.cocoon.environment.Session to
> javax.servlet.http.HttpSession.
> if I cast like  session = (HttpSession)request.getSession(true) it
> does not help.
> How can I put my bind to listener object to Cocoon session?
> Thank you.
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>