exception Implicit Object
exception is the implicit object of Throwable class. This implicit object is used for exception handling in jsp pages.
Note -> exception implicit object can only be used in error pages.
To handle exception in jsp pages, two attributes of page directives is used: isErrorPage, errorPage
There is another way of handling exceptions in jsp pages. That is by using <error-page> element in web.xml file.
To understand about exception implicit object in more detail, we need to learn about Directive elements. Below is a glimplse of how exception is used in jsp page. To understand the full example, we will do so in coming chapters.
<html>
<body>
<% int[] intArr = {1,2,3,4,5};
out.println(num1[6]);
%>
Exception Occured : <%= exception %>
</body>
</html>
- Home
- Java
- Java Fundamentals
- What is Java
- History of Java
- Java Version History
- Local Environment Set-up
- First Java Program
- How to set ‘Path’ env variable
- JDK, JRE, and JVM
- Object Oriented Programming
- Java Data Types
- Classes in Java
- Objects in Java
- Interfaces in java
- Class attributes and methods
- Access Modifiers In Java
- Methods In Java
- Variables and Constants in Java
- Java packages and Imports
- Java Operators
- Constructors in Java
- Control Statements – If else
- Control Statements – Loops
- Arrays in Java
- Java Abstraction
- Inheritance and Polymorphism
- Java Exception Handling
- Strings in Java
- File IO
- Java Miscellaneous
- Java Fundamentals
- Collections
- Multithreading
- Java New Features
- Servlet
- JSP
- Spring
- Hibernate
- Architecture
- Hibernate Example
- First Hibernate Application (using xml configuration)
- First Hibernate Application (using annotations)
- JPA/HB – annotations
- Hibernate Identifiers
- Hibernate Generator Classes
- Save vs saveOrUpdate vs persist in Hibernate
- Inheritance Mapping in Hibernate
- Inheritance Mapping using annotations
- Hibernate Mapping
- Hibernate Query Language (HQL)
- HCQL Hibernate Criteria Query Language
- Hibernate Named Query
- Hibernate Caching
- Second Level Cache
- Spring Boot
- Spring Boot Basics
- Spring Boot Web
- Spring Boot Exception Handling
- Service discovery using Netflix Eureka
- Spring Boot with Swagger3
- Zuul Proxy Server + Routing
- Spring Boot Security
- Spring Boot Hystrix
- Interservice Communication
- Spring Boot Hateoas Links Example
- Lombok api
- Spring Boot with Mongo DB
- Spring Boot Testing
- Spring Web Flux
- Database
- Web Service
- HTML
- Blog & Programs
- Docker