Entering content frame

Procedure documentation Setting Up Your Own Error Pages Locate the document in its SAP Library structure

Use

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).

Moreover, you can create a file ICMERR-EDEFAULT.{html,shtml} in directory icm/HTTP/error_templ_path, whose contents are returned 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. See also icm/HTTP/file_access_<xx>.

Prerequisites

To use dynamic error handling in the ICM or Web dispatcher, you must set the 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

Create files ICMERR-<error code>.(s)html in the relevant directory for the error codes you want. 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-die includes, see http://hoohoo.ncsa.uiuc.edu/docs/tutorials/includes.html).

Note

For the 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.

ECHO

This graphic is explained in the accompanying text <!--#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

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">

INCLUDE

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

This graphic is explained in the accompanying text<!--#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.

Example

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

 

 

Leaving content frame