You are viewing a plain text version of this content. The canonical link for it is here.
Posted to servletapi-dev@jakarta.apache.org by ed...@locus.apache.org on 2000/10/15 17:20:35 UTC
cvs commit: jakarta-servletapi/src/share/javax/servlet/jsp PageContext.java
eduardop 00/10/15 08:20:34
Modified: src/share/javax/servlet/jsp Tag: SERVLET_23_JSP_12
PageContext.java
Log:
Added PageContext.handlePageException(Throwable)
Revision Changes Path
No revision
No revision
1.1.1.1.4.3 +37 -1 jakarta-servletapi/src/share/javax/servlet/jsp/PageContext.java
Index: PageContext.java
===================================================================
RCS file: /home/cvs/jakarta-servletapi/src/share/javax/servlet/jsp/PageContext.java,v
retrieving revision 1.1.1.1.4.2
retrieving revision 1.1.1.1.4.3
diff -u -r1.1.1.1.4.2 -r1.1.1.1.4.3
--- PageContext.java 2000/10/13 22:34:45 1.1.1.1.4.2
+++ PageContext.java 2000/10/15 15:20:34 1.1.1.1.4.3
@@ -514,7 +514,9 @@
* illegal to generate any output to the client, or to modify any
* ServletResponse state after invoking this call.
*
- * <p><B>TODO</B> - should handle Throwable
+ * <p>
+ * This method is kept for backwards compatiblity reasons. Newly
+ * generated code should use PageContext.handlePageException(Throwable).
*
* @param e the exception to be handled
*
@@ -523,9 +525,43 @@
*
* @throws NullPointerException if the exception is null
* @throws SecurityException if target resource cannot be accessed by caller
+ *
+ * @see #handlePageException(Throwable)
*/
abstract public void handlePageException(Exception e) throws ServletException, IOException;
+
+ /**
+ * <p>
+ * This method is identical to the handlePageException(Exception),
+ * except that it accepts a Throwable. This is the prefered method
+ * to use as it allows proper implementation of the errorpage
+ * semantics.
+ *
+ * <p>
+ * This method is intended to process an unhandled "page" level exception
+ * by redirecting the exception to either the specified error page for this
+ * JSP, or if none was specified, to perform some implementation dependent
+ * action.
+ *
+ * <p>
+ * A JSP implementation class shall typically clean up any local state
+ * prior to invoking this and will return immediately thereafter. It is
+ * illegal to generate any output to the client, or to modify any
+ * ServletResponse state after invoking this call.
+ *
+ * @param t the throwable to be handled
+ *
+ * @throws ServletException
+ * @throws IOException
+ *
+ * @throws NullPointerException if the exception is null
+ * @throws SecurityException if target resource cannot be accessed by caller
+ *
+ * @see #handlePageException(Exception)
+ */
+
+ abstract public void handlePageException(Throwable t) throws ServletException, IOException;
/**
* Return a new BodyContent object, save the current "out" JspWriter,