Skip to main content
Version: Next

WEB Server

WEB Server {( option )} -> Function result

ParameterTypeDescription
optionLongint🡒Web server to get (default if omitted = database Web server)
Function resultObject🡐Web server object

Description

The WEB Server command returns the database Web server object, or the Web server object defined through the option parameter.

By default, if the option parameter is omitted, the command returns a reference to the Web server of the database, i.e. the default Web server. To designate the Web server to return, you can pass one of the following constants from the Web Server theme in the option parameter:

ConstantValueComment
Web server database1Current database Web server (default if omitted)
Web server host database2Web server of the host database of a component
Web server receiving request3Web server that received the request (target Web server)
Returned object

The returned Web server object contains the following read-only properties and methods:

PropertyTypeDescription
certificateFolderTextFolder where the certificate files are saved. POSIX full path format using filesystems. Can be passed as a Folder object in the settings parameter.
characterSetNumberCharacter set number
cipherSuiteTextCipher list used for the secure protocol
CORSEnabledBooleanCORS service state
CORSSettingsCollectionList of allowed hosts and methods for the CORS service (collection of objects with host and methods text properties)
debugLogNumberDebug log selector value
defaultHomepageTextDefault homepage
HSTSEnabledBooleanHSTS protocol state
HSTSMaxAgeNumberHSTS life duration
HTTPCompressionLevelNumberHTTP compression level
HTTPCompressionThresholdNumberHTTP compression threshold
HTTPEnabledBooleanHTTP protocol state
HTTPPortNumberListening IP port for HTTP
HTTPTraceBooleanHTTP TRACE activation
HTTPSEnabledBooleanHTTPS protocol state
HTTPSPortNumberListening IP port for HTTPS
inactiveSessionTimeoutNumberLife duration of the inactive session processes
inactiveProcessTimeoutNumberLife duration of the inactive sessions
IPAddressToListenTextIP address to listen or "0.0.0.0" for Any
isRunningBooleanWeb server running state - Cannot be set with the settings object
keepSessionBooleanLegacy session status
logRecordingNumberLog recording value
maxConcurrentProcessesNumberMaximum number of concurrent web processes
maxRequestSizeNumberMax request size
maxSessionsNumberMax sessions
minTLSVersionNumberMinimum TLS version accepted for connections
nameTextName of the web server database - Cannot be set with the settings object
openSSLVersionTextVersion of the used OpenSSL library - Cannot be set with the settings object
perfectForwardSecrecyBooleanPFS availability on the server - Cannot be set with the settings object
rootFolderTextRoot folder path. POSIX full path format using filesystems. Can be passed as a Folder object in the settings parameter
scalableSessionBooleanScalable session management status
sessionCookieDomainTextSession cookie domain
sessionCookieNameTextSession cookie name - Cannot be set with the settings object in scalable session management mode
sessionCookiePathTextSession cookie path
sessionIPAddressValidationBooleanSession IP address validation

These properties are defined in the database settings of the host database or the component. For the host database, they can be overriden using the WEB SET OPTION command.

Note: These properties can also be modified using the settings parameter of the webServer.start( ) method (except those tagged Cannot be set with the settings object). Once the Web server has started, values modified by the settings parameter are updated accordingly in the object returned by WEB Server. These values are used only during the subsequent Web server session (they are reset when the webServer.stop( ) method is called).

MethodDescription
webServer.start( )Starts the Web server
webServer.stop( )Stops the Web server

Example

From your component, you want to know if the Web server of the host database is started:

  // Method of a component
 var $hostWS : Object
 $hostWS:=WEB Server(Web server host database)
 If($hostWS.isRunning)
    ...
 End if

See also

WEB Server list
webServer.stop( )