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, see Application configuration file (one per application).

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 will store the HelloWorld application source files.
  2. Copy all the files from $GSTDIR/samples/HelloWorld directory to your new local directory.
  3. Create a minimal configuration file for your HelloWorld application. Provide an absolute path to the location of your compiled application files in the PATH element, and in the MODULE element specify the module required to launch your application.
    Use a text editor or if you are using Studio, go to File > New > Web/AS > Application Configuration (.xcf)
    Note: The Parent attribute references defaultgwc, which provides default configuration for all GWC applications (see GAS configuration file (as.xcf)).
    <?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.10/cfextwa.xsd">
     <EXECUTION>
      <PATH><path_to_your_local_directory></PATH>
      <MODULE>HelloWorld.42r</MODULE>
     </EXECUTION>
    </APPLICATION>
  4. Name your file with the same name as the application (this is not mandatory but it may help you identify the file), for example, HelloWorld.xcf
  5. Save the configuration file in your $(res.appdata.path)/app directory.
    The default directory for external application configuration files is the $(res.appdata.path)/app directory.
    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.