JSP Exception Implicit Object
In JSP, exception is an implicit object of type
java.lang.Throwable class.
This
object can be used to print the exception. But it can only be used
in error pages.It is better to learn it after
page directive.
Example of exception implicit object:
error.jsp
<%@ page isErrorPage="true" %>
<html>
<body>
Sorry following exception occured:<%= exception %>
</body>
</html>
Fig: JSP Exception Object |
No comments:
Post a Comment