The Struts framework provides support for exception processing in the view layer and the control layer.
User request
-----------------------------> Controller ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------->model
| <---------------------------------
|
|
Localized error message ¿
<------------------------------
Struts framework process abnormal process
The Struts controller is responsible for capturing various exceptions, including the exception thrown in the controller, and the exception thrown when the model is called.
1. After the Struts controller captures the abnormality, create an actionMessage object that describes a message in an exception handling block, saves it in the ACionMessages object, and then saves the actionMessages at a specific range.
2,