Packaging examples
With the fglgar tool you can immediately see the results of a Genero Web Application or Web Service during your development stage without having to install a Web server or a GAS package.
Packaging and running applications with fglgar
If you have a directory named MyFirstApp with a Genero
4GL application and/or a service that you wish to test, then with just three
fglgar commands applications are packaged and can be viewed in a browser.
$ cd MyFirstApp
$ fglcomp -M HelloWorld.4gl
$ fglcomp -M MyWebService.4gl
$ fglgar gar --application HelloWorld.42m --service MySebService.42m
$ fglgar war --input-gar MyFirstApp.gar
Where:
- The application and service source files (4gl) are compiled.
- fglgar gar command is run to create an archive file with the compiled applications and services.
- fglgar war command is run to create a war file that embeds the gar file.
- For information on running the applications, go to Running applications from a war file.
Adding a customized GBC to the package
If you have customized Genero Browser Client (GBC) in a directory named
gbc_customized, then you can include it in the package with the
--gbc
option. The --gbc
option is optional but it allows you
specify a GBC that you have customized specifically for your applications. Otherwise, the default
gbc installed with the FGLGWS package is embedded in the war
file.$ cd MyFirstApp
$ fglcomp -M HelloWorld.4gl
$ fglcomp -M MyWebService.4gl
$ fglgar gar --application HelloWorld.42m --service MyWebService.42m
$ fglgar war --input-gar MyFirstApp.gar --gbc c:\dev\gbc_customized
Where:
- The application and service source files (4gl) are compiled.
- fglgar gar command is run to create an archive file with the compiled applications and services.
- fglgar war command is run to create a war file that embeds the gar file.
- For information on running the applications, go to Running applications from a war file.
Packaging multiple applications
If you have multiple applications to deploy in your MyApps directory that
you wish to test, you can add them to the fglgar gar with
--application
options, as shown. The applications are bundled in the gar and run
from the war file.$ cd MyApps
$ fglcomp -M HelloWorld.4gl
$ fglcomp -M app1.4gl
$ fglgar gar --application HelloWorld.42m --application app1.42m
$ fglgar war --input-gar MyApps.gar
Where:
- The application and service source files (4gl) are compiled.
- fglgar gar command is run to create an archive file with the compiled applications and services.
- fglgar war command is run to create a war file that embeds the gar file.
- For information on running the applications, go to Running applications from a war file.