Chapter 9. Exceptions and Logging
In the previous chapter, we were introduced to interceptors, one of the most powerful aspects of Struts 2. In this chapter, we'll cover something much more mundane, but critical—exception handling and logging. We will explore:
The Struts 2 declarative exception handling mechanism
Some general exception handling practices that will help us create robust applications
Logging configuration and practices to help us take a peek inside our application's execution, and help determine what went wrong when errors occur
Handling exceptions in Struts 2
Struts 2 provides a declarative exception handling mechanism that can be configured globally (for an entire package), or for a specific action. This capability can reduce ...