Application Environment

When the Genero Application Server starts an application process, it sets environment variables from various sources. The application process can be started as a DVM, as an intermediate script or whatever is specified in the application configuration.

This list identifies where environment variables come from and the order that they are applied.

  1. The environment of the dispatcher that starts the proxy is inherited by the child process.
  2. The environment variables set in the application configuration.
  3. The last set of environment variables applied will depend on whether the application is being delivered using the Genero Desktop Client, the Genero Web Client, or is a Genero Web Service.
    1. For Genero Desktop Client and Genero Web Client applications, the variables set in the HTTP request that starts the application. All headers accompany the request.

      The names of these variables are prefixed by FGL_WEBSERVER_HTTP_ and minus (-) characters replaced by underscore (_) characters.

      For example, the User-Agent header is set as FGL_WEBSERVER_HTTP_USER_AGENT=<...>.

      FGL_WEBSERVER_REMOTE_USER holds the REMOTE_USER value provided by the Web Server.

      FGL_WEBSERVER_REMOTE_ADDR holds the REMOTE_ADDR value provided by the Web Server.

    2. For Genero Web Services applications, low-level APIs are used to retrieve environment variables from the request headers.

      The header name is X-FourJs-Environment-Parameter-xxx, where xxx is the header name.

      For example, the server name is found in X-FourJs-Environment-Variable-SERVER_NAME.

      In a delegate example using Genero Web Services, the X-FourJs-Environment-Parameter-Other header is for Genero Web Services:
      LET param2 = req.getRequestHeader("X-FourJs-Environment-Parameter-Other")