An error page is essentially the jsp that handles the exception, so the container gives the page an extra object for exception. In the scriptlet you can use the implicit object exception and in the expression language implicit object ${pageContext.exception}. The object is type java.lang.Throwable, so in the scriptlet you can call methods and with EL you can access the stacktrace and message properties.
But for normal JSP pages this exception object is not available.
No comments:
Post a Comment