Reference servable resources

Related Topics ...

Overview: Configuring a Development Environment

Specifying Input Values for Builder Calls

The project location where you locate create your project contains all of the HTML pages, generated JSP pages, and other servable resources and is referred to as the "servable content root" directory.

When developing Web applications that may be deployed in other application contexts, we need to make sure that any references you make to servable resources are flexible enough to allow for other application contexts.

To make references to servable resources flexible:

Use the webAppAccess.getRequestData().getContextURL() method when referring to servable resources in methods or in builder call inputs.

For example, you could enter the following as the value for the Page to Import input for the Imported Page builder:

${Java/webAppAccess.getRequestData().getContextURL()}/pages_to_import_dir/MyPage.htm

This syntax will always evaluate to the pages_to_import_dir directory regardless of the application context for the Factory on which this model runs.