logo

Exception Implicit Object


Show

An exception is an implicit object in jsp of the type java.lang. class. This object can be made in use to print the exception. But it can be used only on error pages. It is good to learn it once after the completion of the page directive.

Let's check and analyze the easy example:

Example of exception implicit object:

error.jsp

<%@ page isErrorPage="true" %>  
<html>  
<body>    
Sorry following exception occured:<%= exception %>    
</body>  
</html> 

If you want to check the full example then click here to view but it will be good if you study it after the JSP directives.