error.jsp revision 102
394N/A<%--
394N/ACDDL HEADER START
394N/A
394N/AThe contents of this file are subject to the terms of the
394N/ACommon Development and Distribution License (the "License").
394N/AYou may not use this file except in compliance with the License.
394N/A
394N/ASee LICENSE.txt included in this distribution for the specific
394N/Alanguage governing permissions and limitations under the License.
394N/A
394N/AWhen distributing Covered Code, include this CDDL HEADER in each
394N/Afile and include the License file at LICENSE.txt.
394N/AIf applicable, add the following below this CDDL HEADER, with the
394N/Afields enclosed by brackets "[]" replaced with your own identifying
394N/Ainformation: Portions Copyright [yyyy] [name of copyright owner]
394N/A
394N/ACDDL HEADER END
394N/A
394N/ACopyright 2007 Sun Microsystems, Inc. All rights reserved.
394N/AUse is subject to license terms.
727N/A
394N/A--%><%@ page import = "javax.servlet.*,
394N/Ajavax.servlet.http.*,
394N/Ajava.io.*,
394N/Aorg.opensolaris.opengrok.configuration.*"
394N/A%><%@ page session="false" %><%@ page isErrorPage="true" %><%
394N/AString context = request.getContextPath();
394N/ARuntimeEnvironment env = RuntimeEnvironment.getInstance();
618N/Aenv.register();
394N/AString rawSource = env.getSourceRootPath();
394N/AString configError = "";
844N/Aif ("".equals(rawSource)) {
844N/A configError = "SRC_ROOT parameter has not been configured in web.xml! Please configure your webapp.";
618N/A} else {
1273N/A if (env.getSourceRootFile() == null || !env.getSourceRootFile().isDirectory()) {
394N/A configError = "SRC_ROOT parameter in web.xml does not point to a valid directory! Please configure your webapp.";
394N/A }
394N/A}
394N/A%><?xml version="1.0" encoding="iso-8859-1"?>
394N/A<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
394N/A<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
394N/A<head>
394N/A <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
394N/A <title>Error!</title>
394N/A <link rel="icon" href="<%=context%>/img/icon.png" type="image/png"/>
394N/A <link rel="stylesheet" type="text/css" href="<%=context%>/style.css"/>
394N/A <link rel="stylesheet" type="text/css" href="<%=context%>/print.css" media="print" />
394N/A <link rel="alternate stylesheet" type="text/css" media="all" title="Paper White" href="<%=context%>/print.css"/>
394N/A</head>
394N/A<body>
<div id="page">
<div id="header">
<%= getServletContext().getInitParameter("HEADER") %>
</div>
<div id="Masthead"></div>
<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>
<h3 class="error">There was an error!</h3>
<p><%=configError%>
</p><%if (!(exception instanceof NullPointerException)) {%><pre><%
StringWriter wrt = new StringWriter();
PrintWriter prt = new PrintWriter(wrt);
exception.printStackTrace(prt);
prt.flush();
out.write(wrt.toString());
prt.close();
%>
</pre>
<p>
<%=exception.getMessage()%>
</p>
<%
}
%>
<%@include file="foot.jspf"%>