From the course: Java EE: Servlets and JavaServer Pages (JSP)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Understanding the need for listeners in a web app

Understanding the need for listeners in a web app

From the course: Java EE: Servlets and JavaServer Pages (JSP)

Start my 1-month free trial

Understanding the need for listeners in a web app

- [Instructor] Now, let's talk about event and event listeners. Let's first understand what are events in Java Enterprise Edition. They're basically notifications for a change in the state of certain objects. Now, when we say the state of certain objects, it means, a lot of things, let's see what that is. The occur at following levels. One is; if there's a change in the ServletContext object which is at the application level and then there's a change in the HTTPSession object which is at the session level, this is the one that we used for session management, and if there's a change in HTTPServletRequest object, which is at the request level. So when we say that there's a change in the state of these objects, what do we mean by that? It means that, there's a change in either the life cycle or the information that you may be added or removed or replaced from these objects. So it could mean either of them. Now, when can events occur? Let's see all the categories of events that can occur…

Contents