error.jsp revision c0550b01024b910b8c1468811c0ea663b10b1372
286N/A<%--
286N/ACDDL HEADER START
286N/A
286N/AThe contents of this file are subject to the terms of the
286N/ACommon Development and Distribution License (the "License").
286N/AYou may not use this file except in compliance with the License.
286N/A
286N/ASee LICENSE.txt included in this distribution for the specific
286N/Alanguage governing permissions and limitations under the License.
286N/A
286N/AWhen distributing Covered Code, include this CDDL HEADER in each
286N/Afile and include the License file at LICENSE.txt.
286N/AIf applicable, add the following below this CDDL HEADER, with the
286N/Afields enclosed by brackets "[]" replaced with your own identifying
286N/Ainformation: Portions Copyright [yyyy] [name of copyright owner]
286N/A
286N/ACDDL HEADER END
286N/A
286N/ACopyright 2007 Sun Microsystems, Inc. All rights reserved.
286N/AUse is subject to license terms.
286N/A
286N/A--%><%@ page import = "javax.servlet.*,
286N/Ajavax.servlet.http.*,
286N/Ajava.io.*,
286N/Aorg.opensolaris.opengrok.configuration.*"
286N/A%><%@ page session="false" %><%@ page isErrorPage="true" %><%
286N/AString context = request.getContextPath();
286N/ARuntimeEnvironment environment = RuntimeEnvironment.getInstance();
524N/Aenvironment.setUrlPrefix(context + "/s?");
286N/Aenvironment.register();
286N/AString rawSource = environment.getSourceRootPath();
286N/AString configError = "";
286N/Aif ("".equals(rawSource)) {
286N/A configError = "SRC_ROOT parameter has not been configured in web.xml! Please configure your webapp.";
286N/A} else {
286N/A if (environment.getSourceRootFile() == null || !environment.getSourceRootFile().isDirectory()) {
286N/A configError = "SRC_ROOT parameter in web.xml does not point to a valid directory! Please configure your webapp.";
524N/A }
286N/A}
286N/AString pageTitle = "Error!";
286N/A%><%@ include file="httpheader.jspf" %>
286N/A<body>
286N/A<div id="page">
286N/A <div id="header">
286N/A <%@ include file="pageheader.jspf" %>
286N/A </div>
286N/A<div id="Masthead"></div>
286N/A<div id="bar"><a id="home" href="<%=context%>">Home</a> | <input id="search" name="q" class="q"/> <input type="submit" value="Search" class="submit"/> </div>
286N/A<h3 class="error">There was an error!</h3>
286N/A<p><%=configError%>
286N/A</p><%if (!(exception instanceof NullPointerException)) {%><pre><%
286N/A StringWriter wrt = new StringWriter();
286N/A PrintWriter prt = new PrintWriter(wrt);
286N/A exception.printStackTrace(prt);
286N/A prt.flush();
286N/A out.write(wrt.toString());
286N/A prt.close();
286N/A%>
286N/A</pre>
286N/A<p>
286N/A<%=exception.getMessage()%>
286N/A</p>
286N/A<%
286N/A}
286N/A%>
286N/A<%@include file="foot.jspf"%>
286N/A