Here is an example:

<%@ page isErrorPage="true" %>
<i><%=exception.getMessage()%></i><br/>
<% exception.printStackTrace(new java.io.PrintWriter(out)); %>

-- Jeanfrancois

Wendy Smoak wrote:

>Using Tomcat 4.1.12 on Win2000.
>
>I have this in web.xml:
>
>  <error-page>
>     <exception-type>edu.asu.vpia.dao.DAOException</exception-type>
>     <location>/WEB-INF/jsp/exceptionDAO.jsp</location>
>  </error-page>
>
>and in exceptionDAO.jsp, I want to print the stack trace of the exception
>(and the root cause) as an HTML comment.
>
>Unfortunately, when I get to exceptionDAO, (which does have isError="true",)
>the implicit 'exception' object
>is null.
>
>The JSP 1.2 spec talks about one JSP having the 'errorPage' attribute set to
>another JSP which would have the 'isErrorPage' attribute set to true, and
>then the exception object should be there.
>
>But I'm trying to customize error pages for many different sorts of
>Exceptions, so I can't set the 'errorPage' attribute on the first page to
>anything in particular.
>
>I'm almost certain that Tomcat puts the exception object in page or request
>scope, but now I can't find where I read that.
>
>Thanks in advance,
>
>  
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to