Back to Contents | GAS Configuration File Overview


Resource List - Configuration Reference

Resources allow you to create resources, or variables, for use within the configuration files and templates. Resources can be defined in the general RESOURCE_LIST element or within individual application or Web service configurations.


RESOURCE_LIST

The RESOURCE_LIST element of the Genero Application Server configuration file allows you to define RESOURCE elements, which can then be referenced in your configuration files and template files. A resource is a kind of variable that can be used in the configuration files and in template files. By defining and using resources, when the value of the resource needs updating, it becomes possible to modify the resource in one location - within the RESOURCE_LIST - and the new value is carried through the various components that reference the resource.

A resource is defined as platform-independent or platform-dependent, based on the section in which the resource is defined.

Syntax:

<RESOURCE_LIST>
  <PLATFORM_INDEPENDENT> [ resource] [...] </PLATFORM_INDEPENDENT>
  [ <WNT> resource [...] </WNT> ]
  [ <UNX> resource [...] </UNX> ]
</RESOURCE_LIST>

Notes:

The RESOURCE_LIST element may contain the following child elements:

  1. One PLATFORM_INDEPENDENT element (required).
  2. One WNT element (required).
  3. One UNX element (required).

Example:

<RESOURCE_LIST>
  <PLATFORM_INDEPENDENT>
    <RESOURCE Id="res.fglgui" Source="INTERNAL">1</RESOURCE>
    ...
  </PLATFORM_INDEPENDENT>
  <WNT>
    <RESOURCE Id="res.dvm.wa" Source="INTERNAL">$(res.fgldir)\bin\fglrun.exe</RESOURCE>
    ...
  </WNT>
  <UNX>
    <RESOURCE Id="res.dvm.wa" Source="INTERNAL">$(res.fgldir)/bin/fglrun.exe</RESOURCE>
    ...
  </UNX>
</RESOURCE_LIST>

For more information on defining a resource, refer to the RESOURCE section below.


PLATFORM_INDEPENDENT

The PLATFORM_INDEPENDENT element containing a list of platform-independent resources, available on both Unix and Windows platforms.

Notes:

The PLATFORM_INDEPENDENT element may contain the following child element (described below):

  1. Zero or more RESOURCE elements (optional).

Back to the top


WNT

The WNT element containing a list of Windows NT resources: those resources are only available on the Windows NT/2000/XP operating systems.

Notes:

The WNT element may contain the following child element (described below):

  1. Zero or more RESOURCE elements (optional).

Back to the top


UNX

The UNX element contains a list of those resources that are only available on UNIX operating systems. There is no difference between UNIX systems like Linux, AIX, HP-UX, Solaris, and so on.

Notes:

The UNX element may contain the following child element (described below):

  1. Zero or more RESOURCE elements (optional).

Back to the top


RESOURCE

A RESOURCE element defines a resource, or variable, that can be used in the configuration files and in template files. It takes two attributes, an Id attribute and a Source attribute.

Syntax:

<RESOURCE Id="resId" Source="( FILE | INTERNAL | ENVIRON ) " > resData </RESOURCE>

Notes

  1. resId is the resource identifier
  2. resData is the resource data. Its use depends on the value of the Source attribute.
  3. Resources are used in the configuration files or in the template files using the syntax:
       $(resId)

Usage Examples:

The following example illustrates a resource defined inline.

<RESOURCE Id="res.dvm.wa" Source="INTERNAL">$(res.fgldir)/bin/fglrun.exe</RESOURCE>

The following example illustrates a resource defined as the contents of a file. In this example, the resource is a file named generodefault.html, stored in the template directory specified by the resource res.path.tpl:

<RESOURCE Id="res.theme.default.gwc.template" Source="FILE">$(res.path.tpl)/generodefault.html</RESOURCE>

The following example illustrates a resource defined as the value of an environment variable.  In this example, the resource res.os contains the value of the environment variable OS.  For example, on a Windows system, the environment variable OS could have the value Windows_NT.

<RESOURCE Id="res.os" Source="ENVIRON">OS</RESOURCE>

Back to the top