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