error.jsp revision 607
0N/A<%--
0N/ACDDL HEADER START
0N/A
0N/AThe contents of this file are subject to the terms of the
314N/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
0N/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.*,
0N/Aorg.opensolaris.opengrok.configuration.*"
0N/A%><%@ page session="false" %><%@ page isErrorPage="true" %><%
0N/AString context = request.getContextPath();
0N/ARuntimeEnvironment environment = RuntimeEnvironment.getInstance();
0N/Aenvironment.setUrlPrefix(context + "/s?");
0N/Aenvironment.register();
0N/AString rawSource = environment.getSourceRootPath();
0N/AString configError = "";
373N/Aif ("".equals(rawSource)) {
0N/A configError = "SRC_ROOT parameter has not been configured in web.xml! Please configure your webapp.";
0N/A} else {
364N/A if (environment.getSourceRootFile() == null || !environment.getSourceRootFile().isDirectory()) {
364N/A configError = "SRC_ROOT parameter in web.xml does not point to a valid directory! Please configure your webapp.";
364N/A }
364N/A}
364N/AString pageTitle = "Error!";
364N/A%><%@ include file="httpheader.jspf" %>
364N/A<body>
156N/A<div id="page">
156N/A <div id="header">
0N/A <%@ include file="pageheader.jspf" %>
0N/A </div>
364N/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>
156N/A<p><%=configError%>
156N/A</p><pre><%
156N/A StringWriter wrt = new StringWriter();
0N/A PrintWriter prt = new PrintWriter(wrt);
0N/A exception.printStackTrace(prt);
156N/A prt.flush();
156N/A out.write(wrt.toString());
0N/A prt.close();
0N/A%>
364N/A</pre>
364N/A<p>
373N/A<%=exception.getMessage()%>
364N/A</p>
364N/A<%@include file="foot.jspf"%>
364N/A