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