cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Romayev <roma...@yahoo.com>
Subject Re: Session ended - avoiding error pages?
Date Thu, 29 May 2003 13:58:53 GMT
Hi Derek,

I assume you're using the session-fw.

--- Derek Hohls <DHohls@csir.co.za> wrote:
> Hi
> 
> Users need to logon to gain access to the 'protected
> area' 
> of the site - however, it appears that after a
> certain time
> the session expires, and the access "rights" are
> revoked; 
> after that any attempt to access any link in the
> protected 
> sections results in a Cocoon error.
> 
> Three questions:
> 
> 1.  How and whewre is the length of session set?

The session timeout is set in your servlet engine's
web.xml file.  For Tomcat it is conf/web.xml:

<session-config>
  <session-timeout>30</session-timeout>
</session-config>

> 
> 2. Is there any way of triggering, say, the display
> of a 
> default (probably site index) page as soon as the
> session
> ends?

As soon as the session expires, your protected
resources will require authenitcation prior to
accessing.  In your handler you specify a "redirect-to
uri", usually it is your login page:

<handler name="some-name">
 <redirect-to uri="cocoon://login.html"/>
 <authentication uri="cocoon:raw:/authenticate"/>

...

> 
> 3.  If a default (probably site index) page cannot
> be
> triggered automatically, how do I display such a
> page as
> soon as a user attempts to access any link from
> inside the
> protected section AFTER the session expires?

I believe the answer is the same as #2.

Cheers,
-Alex

> 
> Thanks.
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> Mailscanner thanks transtec Computers for their
> support.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> cocoon-users-help@xml.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message