Customize Error Pages for a Better User Experience
Errors are never pretty to users who just want their portal to work. But sometimes they’re inevitable, such as when a user cancels the Basic Authentication prompt when SSO is configured in the portal. Here’s how you can make them a little prettier.
All app servers (we’ll use IIS in this example) allow you to customize the page that is displayed to the user when certain failures occur, such as 401 (Access Denied), 404 (Not Found), and 503 (Service Unavailable). So rather than see an error like the following, you can present the user with a clean, branded error page suggesting other courses of action (close and reopen the browser, refresh the page, link to the main portal site, etc.).

In IIS you do this by going to the web site in IIS Manager and right-clicking, then choosing “Properties”. Then click on the “Custom Errors” tab and you can customize any error page you’d like – just create a new HTML file and direct IIS to point there. Your HTML page should use the same look and feel as the portal so even when errors occur, the user experience is consistent.

Similar tweaks can customize the error pages in Weblogic and Tomcat for the Java versions of the portal. Don’t forget this setting can also be useful for custom portlet code on the remote tier!
Incidentally, IE users often won’t see this custom error page due to a configuration on their client. In these cases, if an error code is returned from the server, IE will show its own (useless) error page rather than the one you’ve put together. This option can be turned off in IE by going to Tools:Internet Options, then clicking the “Advanced” tab, and unchecking “Show friendly HTTP error messages”.