Application configuration file

You create an application configuration file to provide the Genero Application Server (GAS) with the information needed to run an application.

The configuration file has an .xcf file extension. The filename identifies the name of the application. For example, if the configuration file is named app1.xcf, the name of your application (as it appears in the URL) is http://localhost:6394/ua/r/app1.

The configuration file defines an application environment. It starts with the Application element. Within this element, you can have other elements:
  • defining local resources
  • specifying the execution environment
  • specifying the timeout, resources, and output settings
  • referring to previously defined components by using the attribute Using

The organization of the elements within the application configuration file depend on the type of application. See Configuration for Web and service applications.

Save the file in a defined GROUP directory. By default, the directory where the GAS searches for external application configuration files is defined in the GAS configuration file (default as.xcf) by the element:
<GROUP Id="_default">directory</GROUP>
You can specify alternate directories; see GROUP (for an application) or GROUP (for a service).

The application configuration file becomes available once added to the GAS. It is re-read at each application launch. There is no need to restart the GAS after modifying an application configuration file.

This examples shows a well-formed external application configuration files.

Example - A simple application configuration file

The simplest application configuration file specifies a parent application and the path to the compiled application files. The application inherits the configuration of the parent application.

Things to note in this example:
  1. The Id attribute of <APPLICATION> element is omitted; even if included, its value is not read.
  2. The Parent application is defaultwa. See Abstract applications.
  3. The path to the application executables is defined by the PATH component. See PATH (under EXECUTION).
  4. The MODULE element can specify the name of the .42r module to run. In this example the module name is the same as the configuration file name, therefore the element is not necessary. See MODULE.
<APPLICATION Parent="defaultwa"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="http://www.4js.com/ns/gas/3.20/cfextwa.xsd">
  <EXECUTION>
    <PATH>$(res.path.fgldir.demo)/Widgets</PATH>
  </EXECUTION>
</APPLICATION>