Properties Recognized by TiniHttpServer

TiniHttpServer can be configured by setting various properties in a properties files. TiniHttpServer properties fall into three categories:


Server related property names

Property Name

Default Value

Purpose

server.bufferSize 512

Size, in bytes, of the input and output buffers. Other values may provide better throughput. (If you find a better value, please let us know.)

server.docRoot /docs

Specifies the document root directory of TiniHttpServer. If you experience problems when using relative paths, try switching to fully qualified paths (and let us know the details of your problems).

server.initParams (No default)

Specifies server-wide initialization parameters available to servlets via the getInitParameter() and getInitParameterNames() methods of ServletContext. Format as a comma separated list of name=value pairs.

server.logFile (No default)

Specifies the name of the log file to which TiniHttpServer will send all output. If not specified, TiniHttpServer will send all output to System.out.

server.mail.from (No default)

Specifies the text to use in the From: header when e-mailing log files.

server.mail.to (No default)

E-mail address to which log files will be e-mailed when they reach the size specified by server.maxLogSize.

server.maxLogSize

10000

Specifies the maximum size that the server log or transfer log can attain before it is mailed to the server.mail.to address.

server.maxHandlers 5

Specifies the maximum number of concurrently handled requests.

server.mimeTypesFile (No default)

Specifies the name of a properties file containing additional extension to MIME-type mappings. The lines should be formatted ".ext=mime/type". TiniHttpServer has built-in associations for the extensions and types shown here:

Extension

MIME Type

.class

application/octet-stream

.css

text/css

.htm

text/html

.html

text/html

.gif

image/gif

.gz

application/octet-stream

.jar

application/octet-stream

.jpg

image/jpeg

.jpeg

image/jpeg

.js

application/x-javascript

.tini

application/octet-stream

.wml

text/vnd.wap.wml

.zip

application/octet-stream

server.port 80

Specifies the TCP/IP port on which TiniHttpServer listens for requests.

server.requestTimeout

10

Specifies the number of seconds TiniHttpServer will wait for a request on a particular connection. If a browser connects to TiniHttpServer, but does not send a request within this time frame, TiniHttpServer will respond with 408 Request-timeout.

server.stackTrace false

Specifies whether to print a stack trace when logging exceptions. Set to "true" to enable.

server.transferLog (Server log)

Specifies the file to which transfer log entries are sent. If omitted, the entries are sent to the server log. Set to "-" to force transfer log entries to System.out.

server.verbose false

Specifies whether to display properties on startup. Set to "true" to enable. This property can also be enabled by specifying "-v" on the command line.

Servlet related property names

Property Name

Default Value

Purpose

servlet.propFile /etc/servlets.props

Specifies the name of the servlet properties file.

Session related property names

Property Name

Default Value

Purpose

session.name JSESSIONID

Specifies the name used for the automatic session tracking cookie or URL parameter (depending on which session type is configured).

session.timeout 3600

Specifies the initial number of seconds that are allowed between requests for a particular session. Sessions that exceed this time between requests will be invalidated and discarded.

session.type Cookie

Specifies the technique used for automatic session tracking. Set to "Cookie" to use cookies, "URL" to use URL rewriting, or "None" to disable automatic session tracking.


Copyright © 1999-2002 Smart Software Consulting