[opencms-dev] errorPage and templates

Charles Young scott at wranglers.com.au
Tue Jun 29 04:42:01 CEST 2004


Hi Folks,

I've got an issue with using my own errorPage directive on JSPs that use the
<cms:include> tag to include templates.

My test page is:

<%@ page errorPage="errorpage.jsp" buffer="8kb" %>

<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<cms:include property="template" element="head" />
<%
    String myString= null ;
    out.write(myString.length());
%>
</body>
</html>

For my testing, I'm using the template "howto-complete.jsp" from the
"Template Howto" documentation.

The problem is that when I try to view the page, I see the standard OpenCMS
systemerror page instead of seeing my errorpage.

However, if I set buffer = 0kb or if I remove the cms:include tag, then I
see the errorpage as specified on the page directive.

With buffer > 0kb the exception thrown is a
java.lang.ArrayIndexOutOfBoundsException in
com.opencms.flex.cache.CmsFlexResponse.processIncludeList(CmsFlexResponse.ja
va:368)

(Full stack trace available if it will help)

Questions:
Has anyone else managed to get errorPage to work using buffer > 0 and
<cms:include>?

Is there an alternate method for errorPage that as a page decleration? I'm
thinking that it might be more effective to replace the standard OpenCMS
error page. Has anyone done this?

Is there an alternate method in applying templates that works with errorPage
directives?

Regards,
Charles




More information about the opencms-dev mailing list