error.jsp revision 1186
2N/A<%--
2N/ACDDL HEADER START
2N/A
2N/AThe contents of this file are subject to the terms of the
2N/ACommon Development and Distribution License (the "License").
2N/AYou may not use this file except in compliance with the License.
2N/A
2N/ASee LICENSE.txt included in this distribution for the specific
2N/Alanguage governing permissions and limitations under the License.
2N/A
2N/AWhen distributing Covered Code, include this CDDL HEADER in each
2N/Afile and include the License file at LICENSE.txt.
2N/AIf applicable, add the following below this CDDL HEADER, with the
2N/Afields enclosed by brackets "[]" replaced with your own identifying
2N/Ainformation: Portions Copyright [yyyy] [name of copyright owner]
2N/A
2N/ACDDL HEADER END
2N/A
2N/ACopyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
2N/APortions Copyright 2011 Jens Elkner.
2N/A
2N/A--%><%@ page session="false" isErrorPage="true" import="
2N/Ajava.io.PrintWriter,
2N/Ajava.io.StringWriter,
2N/A
2N/Aorg.opensolaris.opengrok.web.Util"
2N/A%><%
2N/A/* ---------------------- error.jsp start --------------------- */
2N/A{
2N/A cfg = PageConfig.get(request);
2N/A cfg.setTitle("Error!");
2N/A
2N/A String context = request.getContextPath();
2N/A String configError = "";
2N/A if (cfg.getSourceRootPath().isEmpty()) {
2N/A configError = "CONFIGURATION parameter has not been configured in "
2N/A + "web.xml! Please configure your webapp.";
2N/A } else if (!cfg.getEnv().getSourceRootFile().isDirectory()) {
2N/A configError = "The source root specified in your configuration does "
2N/A + "not point to a valid directory! Please configure your webapp.";
2N/A }
2N/A%><%@
2N/A
2N/Ainclude file="httpheader.jspf"
2N/A
2N/A%>
2N/A<body>
2N/A<div id="page">
2N/A <div id="whole_header">
2N/A <div id="header">
2N/A<%@
2N/A
2N/Ainclude file="pageheader.jspf"
2N/A
2N/A%>
2N/A </div>
2N/A <div id="Masthead"></div>
2N/A <div id="sbar"><%@
2N/A
2N/Ainclude file="menu.jspf"
2N/A
2N/A %></div>
2N/A </div>
2N/A <h3 class="error">There was an error!</h3>
2N/A <p class="error"><%= configError %></p><%
2N/A if (exception != null) {
2N/A%>
2N/A <p class="error"><%= exception.getMessage() %></p>
2N/A <pre><%
2N/A StringWriter wrt = new StringWriter();
2N/A PrintWriter prt = new PrintWriter(wrt);
2N/A exception.printStackTrace(prt);
2N/A prt.close();
2N/A out.write(Util.htmlize(wrt.toString()));
2N/A %></pre><%
2N/A } else {
2N/A %><p class="error">Unknown Error</p><%
2N/A }
2N/A}
2N/A/* ---------------------- error.jsp end --------------------- */
2N/A%><%@
2N/A
2N/Ainclude file="foot.jspf"
2N/A
2N/A%>