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.
Work area |
Internet Communication Manager, SAP Web Dispatcher |
Unit |
Character string |
Standard value |
- |
Dynamically changeable |
No |
The parameter has the following syntax:
icm/HTTP/file_access_<xx> = PREFIX=<URL-prefix>, DOCROOT=<root directory of files>, CACHECTRL=<sec>
<xx> must be specified in ascending order from 0.
For example,icm/HTTP/file_access_0 = PREFIX=/docs/, DOCROOT=/tmp/documents
Then when the ICM enters the URL prefix /docs/xxx in the browser, the content of file xxx in directory /tmp/documents is returned.
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. |
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 +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.
Note that you have to enter a “+” sign.
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).
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 +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.
Note that you have to enter a “+” sign.