Imported Directory Builder

 

In this topic ...

Quick Tips

Specifying Inputs

Related Topics ...

Overview: Creating Pages

JSP Guidelines

Use the Imported Directory builder to place in a model a set of local HTML content. This content can then be customized with other builders. We can think of the Imported Directory builder as similar to a recursive Import Page builder, offering the added plus of lightweight link bending.

Note that the Imported Directory builder is not designed to handle active applications, including form processing. This builder merely automates the import of content, not the embedding of complex functionality.

Do not attempt to import a large amount of information using this builder. We can exceed the memory resources of the server by importing a large number (200) of relatively plain pages or a small number (20) of very rich pages. When this situation occurs, an "Out of Memory" error message is displayed in the server log.

This builder imports a collection of HTML and/or JSP pages into a set of model pages at regen time. It then re-writes links among these pages so that each link points to the corresponding model page. For example:

The link:

a href="page2.html"

Is transformed into:

a href="< = webAppAccess.getActionURL("page2_html") >"

 

Quick Tips

  • Avoid importing pages that contain complex content. For example, client Java Script navigation, frames, etc. can disrupt this builder's operation. (See Note above.)

 

Specifying Inputs

The Imported Directory builder takes the inputs described in the table below. For help on inputs common to many or all builders such as those in the Properties and HTML Attributes input groups, see "Using the Builder Call Editor."

Input name Description
Name Enter a name for this builder call. The designer tool displays this name in the builder call list.
Starting File or Directory Enter the directory or HTML/JSP file (inside the project's servable content area) which you want to use as the starting point for importation.

Example: factory\pages\main_and_page.html

Max Pages to Import Allows you to set an upper limit on scope of import operation. Enter a value representing total number of pages to import.

Example: 25

A smaller value will limit the amount of time a generation will take.

Import Linked Pages This check box allows you to expand the depth of an import operation. Choose one of the following states:

  • Disabled - Only the contents of the starting directory (or file) are imported.

  • Enabled - As links are found and re-written. Matching pages are imported (recursively) if not already imported
Public Enable this check box to make this builder call and the content it imports, available to a model linked to the model containing this builder call.
Make URLs Absolute Enable this setting if the imported directory contains relative URLs. This setting converts the relative URLs to absolute URLs.

When the imported directory is inserted in another page, URLs on the imported directory remain functional.

If the Factory is running as a non-default application on the application server and the imported directory is stored locally, make sure this option is selected.

Relative URL Context Select one of the following if the imported page contains relative URLs:

  • Use Factory's servable_content_root - The Factory assumes the relative URLs within the imported page are stored in the Factory's servable_content_root directory. This is the default and. It means that absolute URLs are generated to be relative to the factory's servable content area, which generally means adding the current app context name to the generated URL. For example: /images/foo.gif is changed to http://somehost.com/myproject/images/foo.gif".

  • Use servable_content_root of web server's default application - The Factory assumes the relative URLs within the imported page are stored in the servable_content_root directory of the web server's default application. In the rare case that you want /images/foo.gif to refer to the server's servable content root ( no added app context, select "Use servable_content_root of the web server's default application". The use case for this non-default behavior is a shared images directory used by more than one application.
Add BASE tag Enable this setting to allow the browser to resolve relative URLs within the imported directory.

There might be cases when you would want to use a BASE tag instead of converting to absolute URLs. Be careful if your page is embedded in some other page or Web site that "also" defines a BASE tag, your URLs might not be correct.