Previous Topic: CA SiteMinder® Default HTTP HeadersNext Topic: Configure Virtual Servers


Custom Error Handling For Applications

Custom error handling allows you to make error information relevant to your application. To customize applications for users, you can add the HTML text displayed by HTTP 500, HTTP 401, and HTTP 403 error pages or, with the exception of 401 errors, you can redirect the user to a URL that points to a custom error page or application.

You can configure customized handling for the following types of errors:

After you create these HTML files or applications, direct the Web Agent to the custom error pages or URLs.

Note: For an Apache server being used as a proxy or reverse proxy server, the Apache Agent will not return custom CA SiteMinder® error pages, but will return the standard Apache HTTP 500 and 403 error pages.

How to Set Up Error Handling

To customize how your applications display error messages for users, do any of the following tasks:

For HTTP 500 and 403 errors only: If you configure the agent to redirect the user to a URL, the agent appends the error code to the URL. See the following example of an appended URL:

?SMError=error_code, 

If you add standard HTML error text, you can only specify HTML code between the following tags:

<body> 
</body>

To direct the agent to the custom error pages or URLs, do one of the following tasks:

Enter the URL in the value of the respective agent configuration parameter.

Errors and other events and the respective agent configuration parameters are listed in the following table:

Set a custom response for this type of error:

With the value of this configuration parameter:

Server errors

ServerErrorFile

Access denied errors

Custom401ErrorFile

Cookie required errors

ReqCookieErrorFile

CSS characters errors

CSSErrorFile

The error files can reside anywhere in your application.

Important! Leave any URL you configure as a custom error page unprotected.

Note: If the URLs of your applications require HTML tags, encode the characters in the tags. For information about encoding HTML characters, see: http://www.cert.org/tech_tips/.

The following examples show a file path and a URL to an error file. The syntax in the example is for a local configuration file. You can also set these parameters in an agent configuration object.

File Path:

CSSErrorFile="C:\error\error.txt"
ReqCookieErrorFile="C:\custompages\error.txt"
ServerErrorFile="C:\error\error.txt"
Custom401ErrorFile="C:\error\accessdenied.txt"

URL:

CSSErrorFile="http://www.mycompany.com/error.jsp"
ReqCookieErrorFile="http://www.myorg.com/error.asp"
ServerErrorFile="http://www.mycompany.com/error.jsp"

More Information

Custom Error Handling For Applications

Notes for Custom 401 Pages