[opencms-dev] Jsp Template ErrorPages

Nicolas Delsaux nicolas.delsaux at online.fr
Thu Jun 5 08:48:00 CEST 2003


On Thu, 5 Jun 2003 16:00:25 +1200, Greg Montgomery 
<greg.montgomery at sytec.co.nz> wrote:

> Hi,
>
> I would like to setup an error page for a jsp template page.
>
> However if I have the same errorpage defined in my template which is in 
> the
> system/modules area :
>
> <%@ page session="false" %>
> <%@ page import="java.util.*" %>
> <%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
>
> <%@ page errorPage="/opencms/opencms/sample/errorpage.jsp" %>
>
> I get a blank page displayed rather than the specified error page.  I
> believe this is a referencing problem.  The errorpage cannot be located 
> from
> the template.

It seems to me that it's quite logical for you not to have the error page 
defined in a page that use your template.
Indeed, from what I've understood of the jsp template mechanism (see about 
it the HOWTO template, it's very interesting), the only parts of the 
template which are included in a jsp are the ones defined as <cms:template 
element="head/body/foot">.
So, what I suggest you is to modify your template in order to put the <%@ 
page error > tag in the <cms:template element="head">.
This way, when defining a jsp that uses the template, the cms:template will 
result in the inclusion of the error page.
I strongly suggest you to cast a look at the template HOWTO page 3, which 
clearly explains how to use templates in jsps.
>
> Any help would be appreciated.
>
> Thanks,

Hope this helps
>
> Greg Montgomery
>


-- 
Nicolas Delsaux
"La société ne veut pas de nous ? Qu'elle se rassure, on ne veut pas d'elle 
!"




More information about the opencms-dev mailing list