Running applications from a war file

Applications packaged in a Java Web Archive (war) file can be executed with the fglgar tool's run command.

What is the fglgar run command?

The fglgar run command starts the JGAS that is packaged in the specified .war file.

The command opens the port to listen for incoming requests, to launch GUI applications in a browser or to respond to Web services requests.

Important:
  • The FGLGWS needs to be installed on the server to interpret the Genero 4GL applications and services.
  • You need a Java Runtime Environment (JRE) version that is at least version 1.8 or greater.
The next example shows fglgar run command using the MyGeneroJavaApps.war package:
fglgar run -w MyGeneroJavaApps.war -p 9999 -P 4444 -E log.file.path=`pwd` 

To understand how to create a .war file, see Packaging war files.

fglgar run options

The main fglgar run options are:
  • The --war or -w option is mandatory and defines the war file.
  • The --http-port or -p option defines the HTTP port. If not set, the default port is 8080.
  • The --https-port or -P option defines the HTTPS port. If not set, the default port is 443.
  • The --resource-overwrite or -E option defines the GAS resources you want to overwrite, such as the directory of the logs.

See fglgar command reference for more options.

Starting applications from a browser

If, for example, your MyGeneroJavaApps.war file contains two Web application, one called HelloWorld and another called MyApp, the URL requests to launch them then from the browser would look like this:
http://localhost:9999/MyGeneroJavaApps/HelloWorld/ua/r/HelloWorld
http://localhost:9999/MyGeneroJavaApps/MyApp/ua/r/MyApp
Tip: The base URL in the context of JGAS is http://server:port/war_file_name. If you type the base URL in a browser, you get an overview page where you can then access all applications and services published in your JGAS.

Getting Web Services WSDLs

To request the Web Services Descriptive Language (WSDL) of a Web service called MyWebService deployed in the MyGeneroJavaApps.war, the URL must look like this:
http://localhost:9999/MyGeneroJavaApps/MyWebService/ws/r/MyWebService?WSDL