Show TOC

Procedure documentationSetting Up Your Own Error Pages Locate this document in the navigation structure


For each Error Code, you can create an HTML page, which is sent to the client when this error occurs. You can define both static pages (ending .html) and dynamic pages (ending .shtml).

You can also create a file ICMERR-EDEFAULT.{html,shtml} in the directory specified by icm/HTTP/error_templ_path. The ICM / Web Dispatcher returns contents of this file if there is no other template for the error.

If external resources (such as images) should be referenced in the error templates, these can be delivered with the ICM’s file access handler.

For more information, see: icm/HTTP/file_access_<xx>.


To use dynamic error handling in the ICM or Web Dispatcher, you must set profile parameter icm/HTTP/error_templ_path to the directory with the error template files. For example:

icm/HTTP/error_templ_path = /usr/sap/B6M/D13/data/icmerror

Caution Caution

If you use the Internet Explorer Web browser, the option Show friendly HTTP messages must be deactivated. You can set this from the menu:   Tools   Internet Options   Advanced   under Browsing.

End of the caution.


For the required error code create files ICMERR-<error code>.(s)html in the appropriate directory. You can create static or dynamic error pages.

Static Error Pages

If a static error page is defined for an error (ending .html), this is returned to the client.

Dynamic Error Pages

The dynamic pages support the following SSI commands (Server Side Includes); you can find documentation in the Internet).

Note Note

For dynamic substitutions, the whole file must be searched for the SSI tags "<!--". The effort required to do this is related to the size of the file. The dynamic pages cannot be stored in the cache either.

End of the note.

The following section explains the SSI commands that are supported.


Syntax Syntax

  1. <!--#echo var="variable" -->
End of the code.

You can set the following variables:

Variable name



Current time/date: Tue Mar 26 17:15:32 2002


Current GMT time/date: Tue Mar 26 17:15:32 2002


The time when the current file was last modified


Size of the current file in Bytes


SAP Web Application Server 6.30


The name of the server


The server port


URL path (without parameters)


Host name and port through which this server can be reached. For example:


Instance name: ls3022_BIN_12


Error that occurred (numeric)


ICM version




Module Name




Detail on the error that occurred

Caution Caution

Not all fields are available for all errors.

With error ICMEOVERLOAD, for example, the request has not yet been read, which is why field PATH_TRANSLATED has not been set.

End of the caution.

Example Example

In your page you can write, for example:

<tr><td>Server:</td><td><!--#echo var="ICM_SERVER" ></td></tr>

</tr><tr><td background="http://<!--#echo var="ICM_SERVER" >/images/graybar_tile.jpg" height="31">

End of the example.

You can use this command to include a different file at this point.

Syntax Syntax

  1. <!--#include file="file name" -->
End of the code.

Example Example

Your error page can be framed, for example, by the two INCLUDE statements:

<!--#include file="header.html" -->


<!--#include file="footer.html" -->

End of the example.

Caution Caution

The file must not include itself. Recursive inclusion causes the ICM to terminate.

End of the caution.


You can find an example of a dynamic error page and the .shtml file in Example of a Dynamic Error Page.

More Information