Show TOC

icm/HTTP/file_access_<xx>Locate this document in the navigation structure

Use

This parameter determines for which URL prefixes static file access should be set, and in which directory the static files are stored.

If an attempt is made to access a page or file under “virtual_root” defined by the URL prefix, “virtual_root” is replaced by ' “document_root” . The handler then attempts to read the file from the file system and to send it back to the client.

Structure

Work area

Internet Communication Manager, SAP Web Dispatcher

Unit

Character string

Standard value

Depending on system type:

  • ABAP-only or dual stack ( system/type = ABAP| DS ):

    icm/HTTP/file_access_0 = PREFIX=/sap/public/icmandir/ ,DOCROOT=$(DIR_ICMAN_ROOT), ARCHIVE=$(DIR_EXECUTABLE)/ITS.SAR, CACHECTRL=+28800

  • Java-only ( system/type = J2EE ):

    <no default value>

Dynamically changeable

No

Value Range and Syntax

The parameter has the following syntax:

icm/HTTP/file_access_<xx> = PREFIX=<URL prefix>, 
DOCROOT=<root dir>, BROWSEDIR=<n>,DIRINDEX=<file>,IGNORE=<pattern>,
CACHECTRL=<sec>,MAXAGE=<sec>,ARCHIVE=<SAR archive>
            

<xx> must be specified in ascending order from 0 .

Example

The entry icm/HTTP/file_access_0 = PREFIX=/docs/, DOCROOT=/tmp/documents facilitates that the entry of the URL prefix /docs/xxx in the ICM browser returns the content of the xxx file in the /tmp/documents directory directly.

This value overwrites the default value specified above for ABAP and dual stack systems.

Displaying Directory Contents

You can also define a directory index with this parameter.

Use the following options for this.

Option

Meaning / Possible Values

BROWSEDIR

Determines the level of detail in the list. The following values are permitted:

0: Function is inactive -directory contents are not displayed.

1: Only the file names are displayed.

2: File names are displayed together with their size and date last changed.

DIRINDEX

Name of file that is to be displayed instead of the directory contents.

IGNORE

The display of the directory contents can be restricted. Files to which the template applies are not listed.

Caching

There are various caching options: CACHECTRL and MAXAGE .

Caching in the ICM Server Cache

With the option CACHECTRL you can specify the cache time in seconds. This is the length of time the ICM temporarily stores data for after it has sent the data to the client. If the same request arrives within this time interval, it is dealt with in the cache.

You can specify the following values for this option: (Default is CACHECTRL=+3600 , that is, one hour.)

  • 0 or -1 : Files are not passed to the cache.

  • +7200 : Files are kept in the cache for two hours.

Caching in the Client/Browser

With option MAXAGE you can specify the length of time in seconds that an object is cached in the client/browser cache. This value is set in the HTTP response using the HTTP header field cache control: max-age=<duration in seconds> .

If you want to activate object caching in the client/browser, set the value of MAXAGE to a positive numerical value in seconds, for example, MAXAGE=+3600 .

In the standard setup the option is not set - caching in the browser/client is not activated.

Caution

With both options you have to enter a ' + ' sign.

Robots Exclusion Standard File

You can use the file_access_xx parameter also to define access to the robots.txt file. A robots.txt file must be provided for HTML pages that are visible in the Internet. This file defines whether and how visits to an HTML page are permitted for Internet search robots conforming to the standard.

The following parameter must be added to the profile: /HTTP/file_access_0 = DOCROOT=<file name>="",PREFIX=/robots.txt,CACHECTRL=0

If file_access_0 is already filled, the lowest free number must be chosen.

Constraints

Do not use umlauts or other special characters in file names. Files with names that contain special characters are not displayed.

Example

You have configured the port 8080 for HTTP and set:

icm/HTTP/file_access_0 = PREFIX=/doc/, DOCROOT=/tmp/documents,DIRINDEX=index.htm,BROWSEDIR=2,IGNORE=core *.dll *.info *.bak

documents is a directory containing various files.

In the browser open URL http://host:8080/doc/ (do not forget the slash at the end). A detailed display of all the files in the directory will be displayed.

Files with names core, endings info or bak are not displayed in the list. If the file index.htm is in the directory, its contents are displayed.

To display a file double-click it. If it is a directory again, the contents will be displayed or the file specified with DIRINDEX (in this example, index.htm).