The following considerations apply to using the iSeries™ Access for Web file functions in a Web application server environment.
iSeries Access for Web uses the file extension to determine the file content-type (MIME-type). The file content-type is used by the browser to determine how best to render the information. For example, files with an extension of .htm, .html, or .txt are rendered in the browser window. The browser will also attempt to determine what browser plug-in to use for the given file content-type. A file with a .pdf extension will cause the browser to attempt to load the Adobe Acrobat Reader.
iSeries Access for Web provides a way to extend or override the included file extension to file content-type mapping. These overrides are done on an instance basis. For each Web application server (WebSphere® and ASF Tomcat) instance for which iSeries Access for Web is configured, you can override the included file extension content-type mapping.
To override the included mappings, create a file called extension.properties and place the file in the integrated file system at one of the following locations:
An example is provided at /QIBM/ProdData/Access/Web2/config/extension.properties that you can copy to your UserData tree.
For application_server, specify:
For instance_name, specify the name of the Web application server instance in which iSeries Access for Web was configured. This Web application server instance was specified on the QIWA2/CFGACCWEB2 command when you configured iSeries Access for Web.
For server_name, specify the name of the application server within the Web application server instance in which iSeries Access for Web was configured. This application server was specified on the QIWA2/CFGACCWEB2 command when you configured iSeries Access for Web.
Some examples of extension.properties entries are:
For a list of file content-types, see the Internet Assigned Numbers Authority Mime Media Types Web page.
When using Microsoft® Internet Explorer and any of the iSeries Access for Web functions to download a file to the browser, many times Internet Explorer will display the file's content in the browser without offering an opportunity to just save the file. Basically, Internet Explorer examines the data in the file and determines that it can display the data in the browser window. Many users do not want this behavior and would prefer to save the file immediately.
To get around this issue, iSeries Access for Web can now optionally write a HTTP header that forces Microsoft Internet Explorer and other browsers to display a File Save As window. The HTTP header being written is a Content-Disposition header. The Content-Disposition header that can be written is controlled by creating a disposition.properties file. Different Content-Disposition headers can be written based on the file content-type (MIME-type) being downloaded.
iSeries Access for Web uses the file extension to determine the file content-type (MIME-type) to be sent to the browser. The file content-type is used by the browser to determine how best to render the information. For more information about controlling the MIME-type based on the file extension, see Content-type (MIME type) mapping in this topic. This topic describes how to map file extensions to different MIME-types.
Once the MIME-type mapping setup has been done, you need to create a disposition.properties file in the iSeries Access for Web UserData tree. For most of the supported Web serving environments, the iSeries Access for Web UserData tree is /QIBM/UserData/Access/Web2/application_server/instance_name/server_name/config. Replace application_server, instance_name, and server_name with the unique values on your server.
The disposition.properties file needs to contain entries that specify which Content-Disposition header value should be written, based on the MIME-type of the file being downloaded using iSeries Access for Web.
The following sample properties files give an example of what would be required to force a File Save As window when downloading a file with a .TXT extension:
Example:
The extensions.properties file needs to contain: txt=text/plain
The disposition.properties file needs to contain: text/plain=attachment
Changes to the properties file will take effect shortly after the files are changed. The changes do not take effect immediately unless the Web application server is stopped and restarted.
#
+----------------------------------------------------------------------+
| PCSTSK Client Access Tasks |
| System: SYSTEM1 |
| Select one of the following: |
| |
| User Tasks |
| 1. Copy PC document to database |
| 2. Copy database to PC document |
| |
| Administrator Tasks |
| 20. Work with Client Access administrators |
| 21. Enroll Client Access users |
+----------------------------------------------------------------------+
+----------------------------------------------------------------------+ | Enroll Client Access Users | | | |Type choices, press Enter. | | | | User profile . . . . . . . . AARON Name | | User identifier: | | User ID . . . . . . . . . AARON Character value | | Address . . . . . . . . . SYSTEM1 Character value | | User description . . . . . . AARON B. | | Add to system directory . . *NO *NO, *YES | +----------------------------------------------------------------------+