<%-- Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) License Information: http://lamsfoundation.org/licensing/lams/2.0/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.gnu.org/licenses/gpl.txt --%> <%@ page language="java" isErrorPage="true" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%> <%@ taglib uri="tags-lams" prefix="lams"%> <%@ taglib uri="tags-core" prefix="c"%> <%@ taglib uri="tags-fmt" prefix="fmt"%> <%-- Catch JSP Servlet Exception --%> <% if (exception != null) { %> <%=exception.getMessage()%> <%=exception.getClass().getName()%> <% java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream(); java.io.PrintStream os = new java.io.PrintStream(bos); exception.printStackTrace(os); String stack = new String(bos.toByteArray()); %> <%=stack%> <% } else if ((Exception) request.getAttribute("javax.servlet.error.exception") != null) { %> <%=((Exception) request.getAttribute("javax.servlet.error.exception")).getMessage()%> <%=((Exception) request.getAttribute("javax.servlet.error.exception")).getMessage() .getClass().getName()%> <% java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream(); java.io.PrintStream os = new java.io.PrintStream(bos); ((Exception) request.getAttribute("javax.servlet.error.exception")).printStackTrace(os); String stack = new String(bos.toByteArray()); %> <%=stack%> <% } %>