Setting Up Your Own Error Pages

Use

For each error code, you can create an HTML page, which is sent to the client if 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.

Prerequisites

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

Procedure

For the required error codes, 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).

The following section explains the SSI commands that are supported.

ECHO

          
<!--#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

Line

ICM_ERR_DETAIL

Detail on the error that occurred

INCLUDE

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

          
<!--#include file="file name" -->