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.
The goal of this quick start is to create a
war file and run your
application in a
Java Enterprise Edition (J2EE) 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.
Before you begin:You must have created a
gar file with the applications and web services you wish to deploy. See Build Genero archive.
Steps
-
Start the command line interface and set the environment for your Genero BDL using
envcomp.
-
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:
- 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 hello.war file is created. The war is ready to be deployed.
-
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.