Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Getting the base URL of an application  (Read 5553 times)
Carl P.
Posts: 9

« on: March 13, 2018, 04:08:14 pm »

We have an application running Genero 3.10 with GAS and GBC.

I need to find the base URL of the application when it's running in the browser. So on my development laptop I'm running the application using httpdispatch and the URL is:


The application generates a text file that is available to the browser at:


I then need to pass it to a .NET application as a parameter:


I've looked in both the base.Application and ui.Interface classes but can't see anything that will do the job.

Is there anything that will return the base part of the URL?


Carl D. Patterson
Senior Developer
L&P Systems Limited
Reuben B.
Four Js
Posts: 844

« Reply #1 on: March 13, 2018, 08:58:22 pm »

In your dev environment experiment by adding the following near the beginning of your program

  1. run "env | grep 'FGL' | sort > /tmp/carl.env"

you will see a number of environment variables beginning FGL_ are populated by the dispatcher and proxy process.  Your program can then read the appropriate environment variable(s) with FGL_GETENV

Register for WWDC 21 at

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of
Contributor to
Frank G.
Four Js
Posts: 41

« Reply #2 on: March 14, 2018, 09:13:25 am »

Hi, if you are behind a GAS, you should have the environment variable called FGL_VMPROXY_START_URL . The initial URL launched to start you app. Then you can find the base URL by removing the /ua/r part .

ex: LET startURL = fgl_getenv("FGL_VMPROXY_START_URL")
David H.
Posts: 158

« Reply #3 on: March 14, 2018, 11:03:58 am »

You might also find useful
Leo S.
Four Js
Posts: 104

« Reply #4 on: March 14, 2018, 11:35:21 am »

also possible: os.Path.dirname
It has the advantage over WSHelper that it doesn't load a full GWS dll (in case you didn't use GWS elsewhere in your program)

  DISPLAY os.Path.dirname(os.Path.dirname(os.Path.dirname("")))
Carl P.
Posts: 9

« Reply #5 on: March 15, 2018, 03:58:55 pm »

There's lots of good stuff in those environment variables that I hadn't seen before.

Thanks everyone,

Pages: [1]
  Reply  |  Print  
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines