|
|
Table of Contents |
The VolanoChat server uses the servlet runner provided by Sun in its Java Servlet Development Kit (JSDK) 1.0.1. You can find out more about Java servlets at Sun's Java Server Product Group Web site.
The properties file of the servlet runner is given by the
server.http property of the VolanoChat server. By default,
it's a file called httpd.txt in the server installation
directory and looks like this. Each of
the servlet runner properties is defined below.
server.port=8080
This property defines the port number at which the servlet runner accepts HTTP connections for servlet requests. The default if omitted is port 8080.
server.backlog=50
This property specifies the number of incoming connections that can be queued up by your operating system while waiting for the servlet runner to accept them. The default if omitted is a backlog of 50 pending connections.
server.max.handlers=100
This property sets the maximum number of connection handlers that the servlet runner will create. Each time a new connection request arrives, the servlet runner creates a handler for the connection, up to this limit. Additional connections beyond this limit must wait for one of the handlers to finish with its current connection. The default if omitted is 100 concurrent connection handlers.
server.timeout=5000
This property defines the number of milliseconds that a connection handler will wait for a new connection to arrive before terminating. Adjusting this property determines how quickly the pool of connection handlers will shrink when all existing connections have been handled. The default if omitted is 5000 milliseconds (5 seconds).
servlet.dir=
This property specifies the directory containing your Java servlets. The default if omitted is the current working directory.
document.dir=vcclient
This property specifies the directory containing your Web pages and other documents. Note that the delivery of Web pages is not supported by the servlet runner in VolanoChat 2.0.0. The default if omitted is the current working directory.
servlet.propfile=servlets.txt
This property defines the name and location of the properties file
for your Java servlets. This secondary properties file defines aliases
and initialization parameters for your servlets. Its format is defined
in the next section below. The default if omitted is the file
servlets.properties in the current working directory.
Servlet initialization parameters and aliases are specified in a file
defined by the servlet runner's servlet.propfile property.
VolanoChat defines the file by default to be servlets.txt.
The file contains two lines for every servlet:
servlet.servletname.code=servletclass servlet.servletname.initArgs=name1=value1,name2=value2,...,namen=valuen
where:
servletname
servletclass
namen=valuen
For example, the following two lines define the servlet
COM.volano.SnoopServlet to the servlet runner with an alias
of snoop.
servlet.snoop.code=COM.volano.SnoopServlet servlet.snoop.initArgs=test1=1,test2=2
The servlet will be initialized with the two parameters:
test1 = 1 test2 = 2
Now, if you call up COM.volano.SnoopServlet with the
name snoop, as in:
http://host:port/servlet/snoop
it will be initialized with its two parameters and invoked with the request. Calling the servlet directly by its class name, as in
http://host:port/servlet/SnoopServlet
will invoke the servlet with no initialization parameters.
If you modify a Java servlet after it has been loaded by the servlet runner, you must stop and restart the VolanoChat server in order to have the new version loaded.
|
|
Check HTML | Table of Contents |