Build war file and run the application

Build a Java Web Archive (war) file for deployment of the JGAS and applications. The war file embeds the Genero archive with the applications and web services.

Before you begin:

Run the script file envcomp in the Genero BDL installation directory to make sure that your FGLDIR and PATH are set correctly to run compiler and runtime system tools.

You must have created a gar file with the applications and web services you wish to deploy. See Build Genero archive.

  1. Run the fglgar war command to package the Genero Archive in a war archive.

    Genero Browser Client (GBC) customization project, and any additional files can also be included in the war.

    At the command line of the directory with the gar file, type the command:
    fglgar war --web-content MyJgasDir/WebContent --input-gar hello.gar --output hello.war
    Where:
    1. The --web-content option is mandatory. Here you specify the path to the Java Web Content directory of your JGAS installation.
      Tip:

      A second --web-content option may be used to specify a WebContent directory where, for example, you have some additional Java applications or files that overwrite files copied in the first option from the Java Web Content directory of your JGAS installation.

      For more information on using this option, refer to the fglgar page in the Genero Business Development Language User Guide
    2. The --input-gar (-g ) option is mandatory. Here you specify the Genero Archive you want to use to create the war file.
    3. The --output option specifies the relative or absolute path to the war file to generate.
    The hello.war file is created. The war is ready to be deployed in any existing Java Enterprise Edition container such as Apache Tomcat® (version 10 or greater), Jetty, or Glassfish.
    Important:

    If using Apache Tomcat, the JGAS is compatible with Apache Tomcat version 10 or greater.

  2. Run the application on your J2EE server.
    1. Deploy the war file using your J2EE server tool or deployment portal interface.
    2. Use the link or URL created to access the applications deployed in the war file.
      Tip:

      The base URL in the context of the J2EE server is http://server:port/war_file_name. If you type the base URL in a browser, you get the JGAS user interface home page where you can then access all applications and services published in your war file. For more information on the JGAS user interface, go to JGAS home page.

    3. Select the application to run.