Whitebeam Template Reference Documentation

Site Map
 
Home
 
Application Guide
Reference
  Installation
  Configuration
  XML Markup
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

Whitebeam Template Reference Documentation

System Template

env.HostName()

Return the host name to which the request was made.

Syntax

string = rb.page.env.HostName(realReq)

Parameters

The 'env.HostName' method takes 1 parameter:

Name Type/Value Range/Length Description
realReqbool  Optional. Set to 'true' to retrieve information about the original request where this is an error page handler.

Results

The 'env.HostName' method returns string:

Type/Value Range/Length Description
string  

Remarks

Returns the name of the server name to which the client made a request. Each virtual server can have a number of 'alias' values. eg www.whitebeam.org may also have www.whitebeam.org.uk as an alternative 'alias'. Requests to rb.page.env.ServerName() will return www.whitebeam.org regardless of which of the two names used by the cleint. rb.page.env.HostName() on the other hand will return the actual server referenced in the client request.

Modified behaviour from Whitebeam 0.9.19 onwards

By default the presentation serves up information about the page actually being served. If the single parameter is present and has a value of 'true' then the engine returns information about the page requested by the client. The only situation in which these two are different is in the case of an error handler page (eg NotFound.rhtm). In this case passing no parameter would simply return information about the NotFound.rhtm error page, which is generally not very useful. Passing 'true' as a paramter will tell the handler about which page was actaully requested by the server.

Whitebeam release 1.3.36
(loadtime : 72ms)