AOLserver Dynamic Pages (ADPs) -- ADP Parsers

### ADP Parsers

An ADP parser implements a specific syntax for ADPs. Two ADP parsers are pre-defined for AOLserver:

- adp: The "adp" parser handles only the <% ... %> syntax and the <%= ... %> syntax for ADPs. This parser offers the best performance.

  fancy: The "fancy" parser handles the <script language=tcl runat=server stream=on> syntax in addition to the other two syntaxes. It also handles registered ADP tags. The TagLocks parameter is enabled, and the ns_register_adptag and ns_adp_registertag commands are enabled. This parser offers a moderate performance degradation as compared to the "adp" parser.

You can register additional ADP parsers using the Ns_AdpRegisterParser C API function.

#### Configuration

To configure ADP parsers, set parameters in two configuration file sections as follows:

1. Map parsers to file extensions in the ns/server/server-name/adp/parsers configuration file section. For example:

           ns_section "ns/server/server1/adp/parsers"
           ns_param "adp" ".adp"
           ns_param "fancy" ".fadp"

   The above configuration specifies that ADPs with the .adp extension will be parsed using the "adp" parser, and ADPs with the .fadp extension will be parsed using the "fancy" parser.

2. Define a default parser in the ns/server/server-name/adp section. The default parser will be used for any ADPs with file extensions not associated with a parser. For example:

           ns_section "ns/server/server1/adp"
           ns_param "map" "/*.adp"
           ns_param "map" "/*.inc"
           ns_param "map" "/*.fadp"
           ns_param "DefaultParser" "adp"
           ns_section "ns/server/server1/adp/parsers"
           ns_param "adp" ".adp"
           ns_param "fancy" ".fadp"

   ADPs with the .adp extension will use the "adp" parser, and ADPs with the .fadp extension will use the "fancy" extension, as described above. The default ADP parser will be the "adp" parser. Since ADPs with the .inc extension are also allowed, the "adp" parser will be used for those ADPs, because no parser is associated with the .inc extension.

For more information on configuring ADPs, see the ADP configuration file sections starting on page page 56 of the AOLserver Administrator's Guide.

Top of Page
Copyright © 1998-99 America Online, Inc.