RESOURCE

This element defines a variable you can define once and use elsewhere in your Genero Application Server and external application configuration files.

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.

A RESOURCE element defines a resource, or variable, that can be used in configuration files and template files. It takes two attributes, an Id attribute and a Source attribute. The Id attribute is the identifier of the resource itself, while the Source attribute tells the Application Server where to find the value of the resource.

Syntax

<RESOURCE Id="resId" Source="{ INTERNAL | ENVIRON } " > resData </RESOURCE>

Syntax notes

  1. resId is the resource identifier
  2. resData is the resource data. Its use depends on the value of the Source attribute.
    • If Source is INTERNAL, resData is the value of the resource.
    • If Source is ENVIRON, resData is the name of an environment variable.
  3. Resources are used in the configuration files or in the template files using the syntax:
       $(resId)

Usage examples

A resource defined inline.
<RESOURCE Id="res.dvm.wa" Source="INTERNAL">$(res.fgldir)/bin/fglrun.exe</RESOURCE>
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>