server
object to store information common to all JavaScript applications running on the web server.
server
object when the server starts and destroys it when the server stops. Every application on a server shares the same server
object. Use the server
object to maintain global data for the entire server. Many applications can run on a server simultaneously, and the server
object lets them share information.
The runtime engine creates a server
object for each distinct Netscape HTTPD process running on the server.
The properties listed below are read-only properties that are initialized automatically when a server
object is created. These properties provide information about the server process. In addition to these predefined properties, you can create custom properties.
You can lock the server
object to ensure that different applications do not change its properties simultaneously. When one application locks the server
object, other applications must wait before they can lock it.
Property |
Description
String specifying the server name, subdomain, and domain name.
|
|
String indicating the communication protocol used by the server. |
---|
Method |
Description
|
| |
---|
watch
and unwatch
methods from Object
.
server
object properties:
<P>server.host = <SERVER>write(server.host);</SERVER>The preceding code displays information such as the following:
<BR>server.hostname = <SERVER>write(server.hostname);</SERVER>
<BR>server.protocol = <SERVER>write(server.protocol);</SERVER>
<BR>server.port = <SERVER>write(server.port);</SERVER>
server.host = www.myWorld.com
server.hostname = www.myWorld.com:85
server.protocol = http:
server.port = 85
client
, project
, request
host
property specifies a portion of a URL. The host
property is a substring of the hostname
property. The hostname
property is the concatenation of the host
and port
properties, separated by a colon. When the port
property is 80 (the default), the host
property is the same as the hostname
property.
See Section 3.1 of RFC 1738 (http://www.cis.ohio-state.edu/htbin/rfc/rfc1738.html
) for complete information about the hostname and port.
server.hostname
, server.port
, server.protocol
hostname
property specifies a portion of a URL. The hostname
property is the concatenation of the host
and port
properties, separated by a colon. When the port
property is 80 (the default), the host
property is the same as the hostname
property.
See Section 3.1 of RFC 1738 (http://www.cis.ohio-state.edu/htbin/rfc/rfc1738.html
) for complete information about the hostname and port.
server.host
, server.port
, server.protocol
lock()
Lock
, server.lock
port
property specifies a portion of the URL. The port
property is a substring of the hostname
property. The hostname
property is the concatenation of the host
and port
properties, separated by a colon.
The default value of the port
property is 80. When the port
property is set to the default, the values of the host
and hostname
properties are the same.
See Section 3.1 of RFC 1738 (http://www.cis.ohio-state.edu/htbin/rfc/rfc1738.html
) for complete information about the port.
server.host
, server.hostname
, server.protocol
protocol
property specifies the beginning of the URL, up to and including the first colon. The protocol indicates the access method of the URL. For example, a protocol of "http:"
specifies HyperText Transfer Protocol.
The protocol
property represents the scheme name of the URL. See Section 2.1 of RFC 1738 (http://www.cis.ohio-state.edu/htbin/rfc/rfc1738.html
) for complete information about the protocol.
server.host
, server.hostname
, server.port
unlock()
Lock
, server.unlock
Last Updated: 11/13/98 10:23:51