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
If you use the Internet Explorer Web browser, the option Show friendly HTTP messages must be deactivated. You can set this from the menu:
under Browsing.For the required error code create files ICMERR-<error code>.(s)html in the appropriate directory. You can create static or dynamic error pages.
If a static error page is defined for an error (ending .html), this is returned to the client.
The dynamic pages support the following SSI commands (Server Side Includes); you can find documentation in the Internet).
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.
The following section explains the SSI commands that are supported.
Syntax
<!--#echo var="variable" -->
You can set the following variables:
Variable name |
Meaning |
DATE_LOCAL |
Current time/date: Tue Mar 26 17:15:32 2002 |
DATE_GMT |
Current GMT time/date: Tue Mar 26 17:15:32 2002 |
LAST_MODIFIED |
The time when the current file was last modified |
FILE_SIZE |
Size of the current file in Bytes |
SERVER_SOFTWARE |
SAP Web Application Server 6.30 |
SERVER_NAME |
The name of the server |
SERVER_PORT |
The server port |
PATH_TRANSLATED |
URL path (without parameters) |
ICM_SERVER |
Host name and port through which this server can be reached. For example: Is3022.wdf.sap-ag.de:1080 |
ICM_INSTANCE |
Instance name: ls3022_BIN_12 |
ICM_ERR_CODE |
Error that occurred (numeric) |
ICM_ERR_VERSION |
ICM version |
ICM_ERR_COMPONENT |
Component |
ICM_ERR_MODULE |
Module Name |
ICM_ERR_LINE |
Zeile |
ICM_ERR_DETAIL |
Detail on the error that occurred |
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.
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">
You can use this command to include a different file at this point.
Syntax
<!--#include file="file name" -->
Example
Your error page can be framed, for example, by the two INCLUDE statements:
<!--#include file="header.html" -->
...
<!--#include file="footer.html" -->
Caution
The file must not include itself. Recursive inclusion causes the ICM to terminate.
You can find an example of a dynamic error page and the .shtml file in Example of a Dynamic Error Page.