Skip to main content
Version: Next

WEB Server list

WEB Server list : Collection

ParameterTypeDescription
Function resultCollectionCollection of the available Web Server objects
History
ReleaseChanges
18 R3Added

Description

The WEB Server list command returns a collection of all Web server objects available in the 4D application.

A 4D application can contain anywhere from one to several Web servers:

  • one Web server for the host database (default Web server)
  • one Web server for each component.

All available Web servers are returned by the WEB Server list command, whether they are actually running or not.

The default Web server object is automatically loaded by 4D at startup. On the other hand, each component Web server that you want to use must be instantiated using the WEB Server command.

You can use the .name property of the Web server object to identify the project or component to which each Web server object in the list is attached.

Example

We want to know how many running web servers are available:

 var $wSList : Collection
var $vRun : Integer

$wSList:=WEB Server list
$vRun:=$wSList.countValues(True;"isRunning")
ALERT(String($vRun)+" web server(s) running on "+String($wSList.length)+" available.")

See also

WEB Server
webServer.stop()