Problem: Struts provides
classes for maintaining a stack of error message to be reported, which can be used with JSP tags like <html: error> to show these message to the user. The problem starts when you have to report different category/severity of message in a different manner. There are two aspects of this problem
- Throwing error message of different
- Identifying these messages and showing it in a consistent manner.
class comes very handy in resolving the first issue of stacking messages of different category. To throw error messages of different category use an interface to define all the different category of message like FATAL, ERROR, WARNING, INFO etc. Then in the Action or
class you can use
Then in the JSP page you can recognize them by