error.jsp revision 1105
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo SirainenCDDL HEADER START
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo SirainenThe contents of this file are subject to the terms of the
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo SirainenCommon Development and Distribution License (the "License").
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo SirainenYou may not use this file except in compliance with the License.
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo SirainenSee LICENSE.txt included in this distribution for the specific
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainenlanguage governing permissions and limitations under the License.
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo SirainenWhen distributing Covered Code, include this CDDL HEADER in each
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainenfile and include the License file at LICENSE.txt.
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo SirainenIf applicable, add the following below this CDDL HEADER, with the
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainenfields enclosed by brackets "[]" replaced with your own identifying
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Siraineninformation: Portions Copyright [yyyy] [name of copyright owner]
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo SirainenCDDL HEADER END
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo SirainenCopyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainen--%><%@ page import = "javax.servlet.*,
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainen%><%@ page session="false" %><%@ page isErrorPage="true" %><%
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo SirainenString context = request.getContextPath();
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo SirainenRuntimeEnvironment environment = RuntimeEnvironment.getInstance();
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo SirainenString rawSource = environment.getSourceRootPath();
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo SirainenString configError = "";
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainenif ("".equals(rawSource)) {
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainen configError = "CONFIGURATION parameter has not been configured in web.xml! Please configure your webapp.";
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainen if (environment.getSourceRootFile() == null || !environment.getSourceRootFile().isDirectory()) {
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainen configError = "The source root specified in your configuration does not point to a valid directory! Please configure your webapp.";
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo SirainenString pageTitle = "Error!";
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainen%><%@ include file="httpheader.jspf" %>
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainen<div id="page">
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainen <div id="header">
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainen <%@ include file="pageheader.jspf" %>
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainen<div id="Masthead"></div>
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainen<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>
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainen<h3 class="error">There was an error!</h3>
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainen<p><%=configError%>
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainen StringWriter wrt = new StringWriter();
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainen PrintWriter prt = new PrintWriter(wrt);
2a90d8a14b0e7cc1508814bc87d3dfa598ef46a8Timo Sirainen<%@include file="foot.jspf"%>