In the previous article, how to set the error pages in the Serlet. The following is an example of a specific setting:
Error-Page>
Error-Page>
For specific exception classes, you can see the Java's API documentation. Here is an error code when an error occurs during the HTTP request:
400 Unable to resolve this request. 401.1 Unauthorized: Access is rejected due to invalidation of credentials. 401.2 Unauthorized: Access is rejected due to server configuration tends to use an alternate authentication method. 401.3 Unauthorized: Access Due to the setting of the ACL to the requested resource is rejected. 401.4 Unauthorized: Filter authorization installed on the web server failed. 401.5 Unauthorized: ISAPI / CGI application authorization failed. 401.7 Unauthorized: Demonstrates access to the URL authorization policy on the web server. 403 Prohibits Access: Access is rejected. 403.1 Prohibiting Access: Perform access is rejected. 403.2 Prohibition Access: Read Access Rejected. 403.3 Forbidden access: Write access is rejected. 403.4 Disable access: You need to use SSL to view the resource. 403.5 Disable access: You need to use SSL 128 to view the resource. 403.6 Disable access: The client's IP address is rejected. 403.7 Forbidden access: You need SSL client certificates. 403.8 Forbidden access: The client's DNS name is rejected. 403.9 Disable access: Too many clients attempt to connect to the web server. 403.10 Prohibiting access: The web server is configured to refuse to perform access. 403.11 Prohibits Access: The password has been changed. 403.12 Prohibition of access: The server certificate map rejects client certificate access. 403.13 Prohibits Access: The client certificate has been revoked on the web server. 403.14 Prohibiting access: The directory list has been rejected on the web server. 403.15 Prohibiting access: The web server has exceeded the client access license limit. 403.16 Prohibition of access: Client certificate format errors or is not trustworthy by the web server. 403.17 Prohibition of access: Client certificates have expired or have not yet taken effect. 403.18 Disable access: The requested URL cannot be performed in the current application pool. 403.19 Prohibiting access: CMI cannot be performed for the client in the application pool. 403.20 Prohibition of access: Passport login failed. 404 can't find a file or directory. 404.1 Files or Directory Non-found: The website cannot be accessed on the requested port. Note 404.1 Errors only appear on a computer with multiple IP addresses. If a client request is received on a particular IP address / port combination, the IIS returns 404.1 HTTP error without listening to the specific port. For example, if a computer has two IP addresses, only one of the IP addresses is configured to listen on port 80, and any request received from port 80 will cause IIS to return 404.1 errors. This error should only be set at this service level because it will only return it to the client only when using multiple IP addresses on the server.