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