JSP exception implicit object example

In JSP, an 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.
All JSP Examples at JSP Source Code Examples.

Example of exception implicit object

Let's see a simple example:


%@ page isErrorPage="true" %>  
       Sorry following exception occurred:<%= exception %>  
All JSP Examples at JSP Source Code Examples

Free Spring Boot Tutorial - 5 Hours Full Course

Watch this course on YouTube at Spring Boot Tutorial | Fee 5 Hours Full Course