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