Skip to main content
Version: Next

WEB Server

WEB Server : 4D.WebServer
WEB Server( option : Integer ) : 4D.WebServer

ParameterTypeDescription
optionIntegerWeb server to get (default if omitted = Web server database)
Function result4D.WebServerWeb server object

This command is not thread-safe, it cannot be used in preemptive code.

History
ReleaseChanges
18 R3Added
19support for .sessionCookieSameSite

Description

The WEB Server command returns the default 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 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)

The returned Web server object contains the current values of the Web server properties.

Example

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

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

See also

WEB Server list
webServer.stop()