Demo applications are packaged with the FGLGWS product. You can create a war file to run
these applications on your Java Enterprise Edition (J2EE) server.
The goal of this tutorial is to create a war file to run the Genero BDL demo applications on your
J2EE server. The demos are located in your Genero BDL installation directory,
$FGLDIR/demo. For more information on Genero BDL, refer to the Genero Business Development Language User Guide.
Steps
-
Start the command line interface and set the environment for your Genero BDL using
envcomp.
-
Create a new directory, for example, called "demos".
-
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>
-
Create a 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>
-
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.
-
Create the war file by running the following command at the command line
of the demos directory:
fglgar war --web-content MyJgasDir/WebContent --input-gar demos.gar --output demos.war
Where:
- 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
- The
--input-gar
(-g
) option is mandatory. Here you specify
the Genero Archive you want to use to create the war file.
- The
--output
option specifies the relative or absolute path to the
war file to generate.
The demos.war files is created.
-
Run the application on your Java Enterprise Edition (J2EE) server.
-
Deploy the war file using your J2EE server tool or deployment portal
interface.
-
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.
-
Select the application to run.
What to do nextFollow the procedure in Tutorial: Run ggc demos to run the Genero Ghost Client (GGC) demo applications
tests against the demos application running on your J2EE server.