Chapter 10. The Application Events Framework

Topics in This Chapter

  • Understanding the general event-handling strategy

  • Monitoring servlet context initialization and shutdown

  • Setting application-wide values

  • Detecting changes in attributes of the servlet context

  • Recognizing creation and destruction of HTTP sessions

  • Analyzing overall session usage

  • Watching for changes in session attributes

  • Tracking purchases at an e-commerce site

  • Using multiple cooperating listeners

  • Packaging listeners in JSP tag libraries

Developers have many tools at their disposal for handling the life cycle of individual servlets or JSP pages. The servlet init method (Section 2.3) fires when a servlet is first instantiated. JSP pages use the nearly identical jspInit method (Section 3.3 ...

Get More Servlets and JavaServer Pages™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.