User Tools

Site Tools


Sidebar

Network and communication

k24:k24.6:k24.6.3:start

24.6.3 Class Application

The Application (gb.web) class provides information about a CGI application.

24.6.3.1 Properties

The Application class has six properties:

PropertyData typeDescription
RootStringGet the (root) path of the CGI application.
HostStringDetermines the current host.
PortStringGet the port specified in the URL request.
LogFileStringGet the path or set the path to the file to which the standard error output is redirected.
ProtocolStringGet the protocol or set the protocol used by the HTTP request.
RequestStringReturns the request submitted to the CGI application.

Table 24.6.3.1.1 : Properties of the Application class.

Notes:

  • With the CGI environment variable CGI[“SCRIPT_NAME”] you get the root path information as well.
  • Alternatively, you can determine the current host via CGI[“HTTP_HOST”].
  • You can also determine the port used with CGI[“SERVER_PORT”].
  • By default, 'http' is the value of the Protocol property. This property is used internally when returning the URL; as in 'Response.Redirect()'.
  • You can also use 'https' as the protocol if, for example, you are working behind a proxy that writes HTTPS requests to http. Then all URLs - that you use - will follow the protocol 'https'.

You can also determine the value of the Application.Request property using CGI environment variables like this:

"http://" & CGI["HTTP_HOST"] &/ CGI["PATH_INFO"] &/ CGI["SCRIPT_NAME"] & "?" & CGI["QUERY_STRING"]
The website uses a temporary session cookie. This technically necessary cookie is deleted when the browser is closed. You can find information on cookies in our privacy policy.
k24/k24.6/k24.6.3/start.txt · Last modified: 16.08.2022 (external edit)

Page Tools