Configure an application

Before you run an application you need to configure it so that it can be executed by the Genero Application Server.

The goal of this quick start is to provide you with some basic experience in configuring information needed by the Genero Application Server to start an application. You provide these details in a separate application-specific configuration file (xcf).

For the purposes of this quick start, you can create a custom configuration file for the HelloWorld application located in your Genero Studio's installation GSTDIR/samples directory.

  1. Create a new directory (for example, you can name it "HelloWorld_config") on your disk where you put the HelloWorld application runtime files.
  2. Copy all the files from $GSTDIR/samples/HelloWorld directory to your new local directory.
  3. Create a configuration file for your HelloWorld application.
    Use a text editor, or if you are using Studio, go to File > New > Web/AS > Application Configuration (.xcf), and create the configuration as shown in the example:
    <?xml version="1.0" encoding="UTF-8" ?>
    <APPLICATION Parent="defaultgwc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                xsi:noNamespaceSchemaLocation="http://www.4js.com/ns/gas/3.21/cfextwa.xsd">
     <EXECUTION>
      <PATH>path_to_your_local_directory</PATH>
      <MODULE>HelloWorld.42r</MODULE>
     </EXECUTION>
    </APPLICATION>
    Where:
    • The Parent attribute references defaultgwc in the GAS configuration file (as.xcf), which provides default configuration for all GWC applications.
    • In the PATH element, you provide an absolute path to the location of your compiled application files.
    • In the MODULE element, you specify the module required to launch your application.
  4. Save the configuration file.
    Name your file HelloWorld.xcf.

    Save the xcf in the GAS appdata/app directory where application data files managed by the GAS are located.

    You have successfully configured an application.
What to do next

When you have completed the above steps, your next task is to test your application to see if it is configured correctly as detailed in Run an application.