Sun Java System Web Server 7.0 Update 7 Developer's Guide

Enabling Server-Side HTML

The server parses server-side tags only if server-side parsing has been enabled. The following procedure describes how to enable server-side parsing using the Administration interface.

ProcedureEnable Server-Side HTML

  1. Login to Admin Console

  2. Access the Edit Virtual Server , and click the Content Handling tab.

  3. Click the General tab in the Content Handling screen.

  4. Select the options to enable the server-parsed HTML and with exec tag.

  5. In the parsed files drop-down list, select a resource for which the server will parse HTML.

    Choose the virtual server or a specific directory within the virtual server. If you choose a directory, the server will parse HTML only when the server receives a URL for that directory or any file in that directory.

  6. Choose the files to parse.

    • Files with the extension .shtml. The server parses only files with the extension .shtml. This option is the most common (and default) choice.

    • Files with the execute bit and the extension .html. (Unix and Linux only) The server parses files whose UNIX and Linux permissions specify that the execute bit is on. Using the execute permissions can be unreliable because in some cases the bit is set on files that are not executable.

    • All HTML files. The server parses all HTML files. Choosing this option can slow server performance.

  7. Click Save.

  8. Add the following directives are added to the magnus.conf file. Set NativeThread="no" for Web Server.

    In addition, these functions now originate from Shtml.dll (or on UNIX), which is located in install_dirC:\Program Files\Sun\WebServer7 for Windows, and install_dir/sun/webserver7 for UNIX.

  9. To enable parsing of server-side tags for files with extensions other than .shtml, add the extension to the appropriate line in the mime.types file.

    For example, the following line in mime.types indicates that files with either a .shtml or .jbhtml extension are parsed for server-side tags:

    type=magnus-internal/parsed-html exts=shtml,jbhtml