Tutorial: Run fgl demos through JGAS

Demo applications are packaged with the FGLGWS product. You can create a war file that allows you to run these applications through the JGAS.

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.

  • A Java Runtime Environment (JRE) is required to run the application war file with fglgar run.

  1. Create a new directory, for example, called "demos".

    mkdir demos

  2. With a text editor create a configuration file named gwc-demo.xcf. Add the following configuration and save the file to the "demos" directory:
    <?xml version="1.0" encoding="UTF-8"?>
    <APPLICATION >
      <EXECUTION>
        <PATH>$(res.fgldir)/demo</PATH>
        <MODULE>demo</MODULE>
      </EXECUTION>
    </APPLICATION>
    
  3. Create a second configuration file named simple-demo.xcf with the following and save to the "demos" directory:
    <?xml version="1.0" encoding="UTF-8"?>
    <APPLICATION >
      <EXECUTION>
        <PATH>$(res.fgldir)/demo/Widgets</PATH>
        <MODULE>Edit.42m</MODULE>
      </EXECUTION>
    </APPLICATION>
    
  4. Create the gar file by running the following command at the command line of the demos directory:
    fglgar gar --output demos.gar --application gwc-demo.xcf --application simple-demo.xcf
    The demos.gar file is created.
  5. Create the war file by running the following command at the command line of the demos directory:
    fglgar war --input-gar demos.gar --output demos.war
    
    The demos.war files is created.
  6. Run the demos application on standalone JGAS
    1. Use the following command at the command line of the demos directory:
      fglgar run --war demos.war
      
    2. You can now run the applications via your browser at the following URLs:

      http://localhost:8080/demos/ua/r/gwc-demo

      http://localhost:8080/demos/ua/r/simple-demo

  7. Or you can run the demos application on your J2EE server.
    1. Deploy the war file using your J2EE server tool or deployment portal interface.
    2. Run the applications from the J2EE server.