<%@ page session="false" isErrorPage="true" contentType="text/html" import=" org.opencms.jsp.util.*,org.opencms.file.*,org.opencms.main.*,org.opencms.frontend.templatetwo.* "%><% // initialize instance of status bean CmsJspStatusBean cms = new CmsJspStatusBean(pageContext, request, response, exception); // get the template to use String template = null; String path = cms.getRequestResourceName(); do { try { path = CmsResource.getParentFolder(path); if (path == null) { break; } template = cms.getCmsObject().readPropertyObject(cms.getSiteRoot() + path, "template", true).getValue(); } catch (CmsException ex) { out.println(ex.getMessage()); } } while (template == null); if (template != null && template.equals(CmsTemplateLayout.VFS_PATH_TEMPLATE)) { cms.setTemplateUri(path); } else { template = cms.property("template", "search", "/system/handler/template/handlertemplate"); } // include the template head part cms.includeTemplatePart(template, "head"); %> <%= cms.getPageContent("head") %>

<%= cms.key("error_message_servererror") %>

<%= cms.keyStatus("error_message") %>

<%= cms.keyStatus("error_description") %>

<% if (cms.showException() && cms.getErrorMessage() != null) { // print the error message for developers, if available out.print("

" + cms.getErrorMessage() + "

"); } if (cms.showException() && cms.getException() != null) { // print the exception for developers, if available %>

<%= cms.getException() %>

<% cms.getException().printStackTrace(new java.io.PrintWriter(out)); %>

<% } %> <%= cms.getPageContent("foot") %> <% // include the template foot part cms.includeTemplatePart(template, "foot"); // set the original error status code for the returned page Integer status = cms.getStatusCode(); if (status != null) { cms.setStatus(status.intValue()); } %>