我在web.xml里指定了page-error
然后在显示异常的页面<%@ page language="java" pageEncoding="utf-8"%>
<%@ page isErrorPage="true" %>
<%
out.print(exception.toString());
out.print(exception.getMessage());
out.print(exception.getLocalizedMessage());
exception.printStackTrace();
%>但是在页面只输出了几行数据,myeclipse的console里却输出了一大串,那一大串怎样输出到jsp去啊??
然后在显示异常的页面<%@ page language="java" pageEncoding="utf-8"%>
<%@ page isErrorPage="true" %>
<%
out.print(exception.toString());
out.print(exception.getMessage());
out.print(exception.getLocalizedMessage());
exception.printStackTrace();
%>但是在页面只输出了几行数据,myeclipse的console里却输出了一大串,那一大串怎样输出到jsp去啊??
exception.printStackTrace(out);
%>
The method printStackTrace(PrintStream) in the type Throwable is not applicable
for the arguments (JspWriter)
<% exception.printStackTrace(response.getWriter());%>
exception.printStackTrace(new java.io.PrintWriter(out));