This class processes the error messages sent back to the user. Usually this can be done in the web application using the mechanisms provided by the application server, whatever it would be. In some deployment scenarios, it's recommended to configure a custom error management, specially for 401 (Unauthorized) error. This scenario is for example silent Kerberos, as a 401 error could be either part of the negotiation process, i.e. the server is sending this error to tell the browser some credentials are needed, or the final error response. This last case is the only one the error message should be sent back to the user.
It reads the specific error messages stored in html file, having as a name the HTTP error number (for instance 401.html). Each error is put in a map that is populated just once and can be read multiple times.