Sun Java System Web Server 7.0 Developer's Guide

Enabling Server-side HTML

The server parses server-side tags only if server-side parsing has been enabled.

To enable server-side parsing using the Administration interface, perform the following steps:

ProcedureTo Enable Server-side HTML

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

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

  3. Select the check boxes to enable the server-parsed HTML and with exec tag.

  4. Specify a resource for which the server will parse HTML, use the drop-down list.

    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.

  5. Choose the files to parse. The choices are:

    • Files with the extension .shtml. The server parses only files with the extension .shtml. In this case, all files you want to parse must have the .shtml extension. This 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.

  6. Click Save.

    When you activate parsing, make sure that the following directives are added to the magnus.conf file:


    Note –

    You must set NativeThread="no" for Web Server. In addition, these functions now originate from Shtml.dll (or libShtml.so on UNIX), which is located in install_dirC:\Program Files\Sun\WebServer7 for Windows, and install_dir/sun/webserver7 for UNIX.


    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