Start the Web server service

When running the GRE daemon on a different machine than the DVM, and using any output type aside from SVG running against the Genero Desktop Client, you must set up the environment before you can preview reports.

Start the Web server service by invoking the command grehttpd, which is located at $GREDIR/bin/. The grehttpd command has the following options:
  • -p port, where port is the port number. The default port is 8080.
  • -q activates the Web server service in quiet mode.
  • -d directory, where directory specifies the Web root. The Web root directory contains report files that are generated by the GRE. There may be several. If nothing is specified, then the current working directory (".") is taken as the Web root.
  • -license prints the NanoHTTPD license.

If the GREOUTPUTDIR environment variable is set while starting the GRE daemon greportwriter, you must specify the same directory (the Web root directory) while running grehttpd with the option -d.

If GREOUTPUTDIR has not been set, you have to either specify the directory where the GRE daemon has been started in with the command -d, or run grehttpd in the Web root directory.

If you start grehttpd on a specific port with the command -p, you may have to configure the URL prefix containing the host and the port where the GRE Web Server service (grehttpd) is running. You can do this:
  • In the 4GL source code, by calling the API fgl_report_configureDistributedURLPrefix() and adding a link to the description of that API.

  • In the as.xcf file by specifying the element <REPORT_REMOTE_URL_PREFIX> in section <INTERFACE_TO_CONNECTOR> and adding a link to the description of that element.

Note:

The Genero Report Engine ships with this minimal Web server. However, any other web server capable of serving static files can be used.

During development the GAS standalone dispatcher, httpdispatch, can be used instead of a Web server. An example using httpdispatch can be found in Configure for the Web client in the Genero Studio User Guide.