Quadcap Web Server

Web Applications

Quadcap Software

Server Configuration Files

The Quadcap Embeddable Server uses a modular services architecture, permitting a flexible and direct way of specifying the services to be deployed. Each service to be managed is listed in the server.xml file, in the root directory of the QWS installation.

server.xml

<server>
 

This document is used to configure and initialize QED services.

<service>
 

Each service definition has the following allowed elements.

<service-name>
 

The name of the service.

<service-class>
 

The name of the Java class which implements the service.

<service-config>
 

The name of a service configuration file.

<load-on-startup>
 

An integer value used to control the order in which services are loaded. Lower values are started first.

<init-parameter>
 

String-valued configuration parameters may be supplied to a service.

<param-name>
 

The initialization/configuration parameter name.

<param-value>
 

The initialization/configuration parameter value.

web.props

The Quadcap Web Server (QWS) is a service which is configured using an associated properties file, by default named web.props. The following table lists the definitions of the properties in that file:

NameDefaultDescription
tempDir ./repository Specifies the name of a directory where temporary JSP-generated files are placed.
context.*.root none Specify the context path for a web application. The application name is specified by the 'wildcard' portion of the property name.
context.*.docBase none Specify the path to the web application's files, either as a directory name or the name of a Web Application Archive (.war) file.
acceptor.*.port none Specify the port number for the server to listen on. The wildcard portion of the name gives the name of the socket acceptor, and doesn't have any real significance other than as a unique name for the acceptor.
acceptor.*.queueDepth 32 Specify the TCP queue depth associated with the named acceptor.
maxWorkers 64 QWS uses a thread-pool architecture; new worker threads are created on demand to satisfy load, up to a a configurable maximum number, specified by this configuration parameter.
name none Specify the name of this server.
workerClass none Class to instantiate to handle requests
shutdownInterval 2000 Graceful delay on shutdown
port none TCP Port to accept connections from
queueDepth 16 TCP listen queue depth

config.props

Overall server configuration information is also managed through the Config "service", which can be controlled using the file config.props. The following configuration variables are available in that file:

NameDefaultDescription
debug.file stderr Specify the name of the debug log file. The default value, stderr, causes debug information to be written to System.err.
debug.level 0 Specify the level of debugging output. Level zero, the lowest level, essentially turns debug output off (though errors/exceptions will still be reported.) Increasing levels will result in more debug output. The maximum debug level is five (5).
jsp.compiler jikes Choices are 'jikes' or 'javac'.

Quadcap Web Server

web.xml

The Quadcap Web Server implements the Servlet 2.2 API, and includes support for Servlet 2.2 Web Applications. Part of this spec involves the Web Application Deploment descriptor, the file WEB-INF/web.xml. Here are the supported elements in this file:

<web-app>
 

The web-app element is the root element of the document used to describe and configure a web application.

<context-param>
 

Application initialization parameters, available via ServletContext.getInitParameter(String) are specified here.

<param-name>
 

Specifies the name of an initialization parameter.

<param-value>
 

Specifies the value of an initialization parameter.

<session-timeout>
 

Specifies the time period after which inactive sessions will be closed.

<servlet-mapping>
 

Used to tell the container how to map incoming requests to servlets, based on exact path match, prefix path match, or extension match.

<url-pattern>
 

Specifies the pattern to match.

<servlet-name>
 

Specifies the name of the servlet to invoke on URIs which match the specified pattern.

<mime-mapping>
 

Used to tell the container which MIME types are associated with particular file extensions.

<extension>
 

The file name extension (without the '.')

<mime-type>
 

The MIME type to associate with the specified file extension.

<display-name>
 

The name associated with the Web Application when displayed in the administrative UI.

<error-page>
 

The page to be invoked if exceptions are thrown by servlets in the application

<servlet>
 

Define a servlet to be part of this Web Application

<servlet-name>
 

Specify the name of the servlet. This name isn't really significant except in that it uniquely identifies the servlet for the purpose of references to the servlet in this document (e.g. web-app/servlet-mapping/servlet-name)

<servlet-class>
 

Specify the name of the Java class which implements the servlet.

<init-param>
 

Specify servlet initialization parameters, accessible to the servlet via ServletConfig.getInitParameter()

<param-name>
 

Specifies the name of an initialization parameter.

<param-value>
 

Specifies the value of an initialization parameter.

<load-on-startup>
 

If specified, this causes the servlet to be initialized when the web application is loaded, in the order specified by the integer value of this element, lower numbers being loaded first.

Quadcap Embeddable Server Admin Tool

QWS includes an administrative web application which allows the developer to list the currently-loaded web applications, load new applications, and unload (i.e., stop) or reload active applications. The default URL for this application is:

  http://localhost:8080/admin/web/list.adm