4D v19

webServer.start( )

Home

 
4D v19
webServer.start( )

webServer.start( )  


 

The webServer.start( ) method starts the Web server on which it is applied, using properties set in the optional settings object parameter. 

The Web server starts with default settings defined in the settings file of the database or (host database only) using the WEB SET OPTION command. However, using the settings parameter, you can define customized settings for the Web server session. For a description of the settings, see the Returned object of the WEB Server command or the Web server properties page (some properties cannot be defined in the settings object).
Customized session settings will be reset when the webServer.stop( ) method is called. 

The method returns an object describing the Web server launch status. This object can contain the following properties:

 

Property   Type Description
success   Boolean True if the Web server was correctly started, False otherwise
errors   Collection Error stack (not returned if the Web server started successfully)
  [ ].errCode Number Error code
  [ ].message Text Description of the error
  [ ].componentSignature Text Internal component signature

 

Note: If the Web server was already launched, an error is returned. 

Example  

 C_OBJECT($settings;$webServer;$result)
 $settings:=New object("HTTPPort";8080;"defaultHomepage";"myAdminHomepage.html")
 
 $webServer:=WEB Server
 $result:=$webServer.start($settings)
 If($result.success)
  //...
 End if



See also 

webServer.stop( )

 
PROPERTIES 

Product: 4D
Theme: Web Server

 
PAGE CONTENTS 
 
HISTORY 

 
ARTICLE USAGE

4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)