Root Element

ElementDescriptionClass
jettyCreates an embedded Jetty web server with optional web application contextorg.mortbay.jetty.xbean.JettyFactoryBean

Element Summary

ElementDescriptionClass
bioConnectorCreates a BIO based socket connectororg.mortbay.jetty.bio.SocketConnector
blockingNioConnectorCreates a blocking NIO based socket connectororg.mortbay.jetty.nio.BlockingChannelConnector
contextHandlerCreates a basic HTTP contextorg.mortbay.jetty.handler.ContextHandler
contextsContextHandlerCollection. This {@link org.mortbay.jetty.handler.HandlerCollection} is creates a {@link org.mortbay.jetty.servlet.PathMap} to it's contained handlers based on the context path and virtual hosts of any contained {@link org.mortbay.jetty.handler.ContextHandler}s. The contexts do not need to be directly contained, only children of the contained handlers. Multiple contexts may have the same context path and they are called in order until one handles the request.org.mortbay.jetty.handler.ContextHandlerCollection
defaultHandlerDefault Handler. This handle will deal with unhandled requests in the server. For requests for favicon.ico, the Jetty icon is served. For reqests to '/' a 404 with a list of known contexts is served. For all other requests a normal 404 is served. TODO Implement OPTIONS and TRACE methods for the server.org.mortbay.jetty.handler.DefaultHandler
handlerCollectionA collection of handlers. For each request, all handler are called, regardless of the response status or exceptions.org.mortbay.jetty.handler.HandlerCollection
hotDeployerCreates a hot deployer to watch a directory for changes at a configurable interval.org.mortbay.jetty.deployer.ContextDeployer
jaasUserRealmCreates a UserRealm suitable for use with JAASorg.mortbay.jetty.plus.jaas.JAASUserRealm
jettyCreates an embedded Jetty web server with optional web application contextorg.mortbay.jetty.xbean.JettyFactoryBean
ncsaLogThis {@link RequestLog} implementation outputs logs in the pseudo-standard NCSA common log format. Configuration options allow a choice between the standard Common Log Format (as used in the 3 log format) and the Combined Log Format (single log format). This log format can be output by most web servers, and almost all web log analysis software can understand these formats.org.mortbay.jetty.NCSARequestLog
nioConnectorCreates an NIO based socket connectororg.mortbay.jetty.nio.SelectChannelConnector
requestLogHandlerRequestLogHandler. This handler can be used to wrap an individual context for context logging.org.mortbay.jetty.handler.RequestLogHandler
resourceHandlerResource Handler. This handle will serve static content and handle If-Modified-Since headers. No caching is done. Requests that cannot be handled are let pass (Eg no 404's)org.mortbay.jetty.handler.ResourceHandler
serverCreates an embedded Jetty web serverorg.mortbay.jetty.Server
ssoJaasUserRealmCreates a UserRealm suitable for use with JAAS w/ support of SSOorg.mortbay.jetty.plus.jaas.SSOJAASUserRealm
strictRoleCheckPolicyCheck only topmost role in stack of roles for userorg.mortbay.jetty.plus.jaas.StrictRoleCheckPolicy
webAppContextCreates a servlet web application at a given context from a resource baseorg.mortbay.jetty.webapp.WebAppContext

Element Detail

Element: bioConnector

Element: blockingNioConnector

Element: contextHandler

AttributeTypeDescription
allowNullPathInfoxs:boolean
compactPathxs:boolean
contextPathxs:string
displayNamexs:string
maxFormContentSizexs:integer
resourceBasexs:string
shutdownxs:booleanSet shutdown status. This field allows for graceful shutdown of a context. A started context may be put into non accepting state so that existing requests can complete, but no new requests are accepted.
ElementTypeDescription
attributes<spring:bean/>
baseResource<spring:bean/>
classLoader<spring:bean/>
connectorNames(<spring:bean/>)*Set the names of accepted connectors. Names are either "host:port" or a specific configured name for a connector.
errorHandler<spring:bean/>
eventListeners(<spring:bean/>)*
hosts(<spring:bean/>)*Get the hosts for the context.
initParams<spring:bean/>
mimeTypes<spring:bean/>
parent<spring:bean/>
serverserver
virtualHosts(<spring:bean/>)*Get the virtual hosts for the context. Only requests that have a matching host header or fully qualified URL will be passed to that context with a virtual host name. A context with no virtual host names or a null virtual host name is available to all requests that are not served by a context with a matching virtual host name.
welcomeFiles(<spring:bean/>)*

Element: contexts

AttributeTypeDescription
contextClassxsd:string
ElementTypeDescription
handlers(<spring:bean/>)*

Element: defaultHandler

AttributeTypeDescription
serveIconxs:boolean

Element: handlerCollection

ElementTypeDescription
handlers(<spring:bean/>)*
serverserver

Element: hotDeployer

AttributeTypeDescription
directoryxs:string
recursivexs:boolean
scanIntervalxs:integer
ElementTypeDescription
configurationDir<spring:bean/>
configurationManager<spring:bean/>
contextscontextsAssociate with a {@link ContextHandlerCollection}.

Element: jaasUserRealm

AttributeTypeDescription
callbackHandlerClassxs:string
loginModuleNamexs:stringSet the name to use to index into the config file of LoginModules.
namexs:stringGet the name of the realm.
ElementTypeDescription
roleCheckPolicy<spring:bean/>
roleClassNames(<spring:bean/>)*

Element: jetty

ElementTypeDescription
deployers<spring:bean/>
hotDeployerhotDeployer

Element: ncsaLog

AttributeTypeDescription
appendxs:boolean
extendedxs:boolean
filenamexs:string
filenameDateFormatxs:stringSet the log file date format.
logCookiesxs:boolean
logDateFormatxs:string
logLatencyxs:boolean
logServerxs:boolean
logTimeZonexs:string
preferProxiedForAddressxs:boolean
retainDaysxs:integer
ElementTypeDescription
ignorePaths(<spring:bean/>)*
logLocale<spring:bean/>

Element: nioConnector

AttributeTypeDescription
delaySelectKeyUpdatexs:booleanGet delay select key update If true, the select set is not updated when a endpoint is dispatched for reading. The assumption is that the task will be short and thus will probably be complete before the select is tried again.
lowResourceMaxIdleTimexs:integerSet the period in ms that a connection is allowed to be idle when this there are more than {@link #getLowResourcesConnections()} connections. This allows the server to rapidly close idle connections in order to gracefully handle high load situations.
lowResourcesConnectionsxs:longSet the number of connections, which if exceeded places this manager in low resources state. This is not an exact measure as the connection count is averaged over the select sets.
lowResourcesMaxIdleTimexs:longSet the period in ms that a connection is allowed to be idle when this there are more than {@link #getLowResourcesConnections()} connections. This allows the server to rapidly close idle connections in order to gracefully handle high load situations.
maxIdleTimexs:integer

Element: requestLogHandler

ElementTypeDescription
requestLog<spring:bean/>
serverserver

Element: resourceHandler

AttributeTypeDescription
aliasesxs:booleanSet if resource aliases (eg symlink, 8.3 names, case insensitivity) are allowed. Allowing aliases can significantly increase security vulnerabilities.
cacheControlxs:string
resourceBasexs:string
ElementTypeDescription
baseResource<spring:bean/>
mimeTypes<spring:bean/>
welcomeFiles(<spring:bean/>)*

Element: server

AttributeTypeDescription
gracefulShutdownxs:integerSet graceful shutdown timeout. If set, the {@link #doStop()} method will not immediately stop the server. Instead, all {@link Connector}s will be closed so that new connections will not be accepted and all handlers that implement {@link Graceful} will be put into the shutdown mode so that no new requests will be accepted, but existing requests can complete. The server will then wait the configured timeout before stopping.
portxs:integer
sendDateHeaderxs:boolean
sendServerVersionxs:boolean
stopAtShutdownxs:boolean
ElementTypeDescription
connectors(<spring:bean/>)*Set the connectors for this server. Each connector has this server set as it's ThreadPool and its Handler.
handlers(<spring:bean/>)*
sessionIdManager<spring:bean/>
threadPool<spring:bean/>
userRealms(<spring:bean/>)*

Element: ssoJaasUserRealm

ElementTypeDescription
SSORealm<spring:bean/>Set the SSORealm. A SSORealm implementation may be set to enable support for SSO.

Element: strictRoleCheckPolicy

Element: webAppContext

AttributeTypeDescription
contextPathxs:stringThe context path
copyWebDirxs:boolean
defaultsDescriptorxs:stringThe default descriptor is a web.xml format file that is applied to the context before the standard WEB-INF/web.xml
descriptorxs:string
distributablexs:boolean
extraClasspathxs:string
extractWARxs:boolean
logUrlOnStartxs:booleanSets whether or not the web app name and URL is logged on startup
overrideDescriptorxs:stringThe override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml
parentLoaderPriorityxs:boolean
warxs:string
webAppxs:stringThe URL or filename of the webapp directory or war file.
ElementTypeDescription
classLoader<spring:bean/>
configurationClasses(<spring:bean/>)*
configurations(<spring:bean/>)*
errorHandler<spring:bean/>
eventListeners(<spring:bean/>)*
parent<spring:bean/>The parent HandlerContainer.
permissions<spring:bean/>
resourceAliases<spring:bean/>
securityHandler<spring:bean/>
serverClasses(<spring:bean/>)*
servletHandler<spring:bean/>
sessionHandler<spring:bean/>
systemClasses(<spring:bean/>)*
tempDirectory<spring:bean/>Get a temporary directory in which to unpack the war etc etc. The algorithm for determining this is to check these alternatives in the order shown:

A. Try to use an explicit directory specifically for this webapp:

  1. Iff an explicit directory is set for this webapp, use it. Do NOT set delete on exit.
  2. Iff javax.servlet.context.tempdir context attribute is set for this webapp && exists && writeable, then use it. Do NOT set delete on exit.

B. Create a directory based on global settings. The new directory will be called "Jetty_"+host+"_"+port+"__"+context+"_"+virtualhost Work out where to create this directory:

  1. Iff $(jetty.home)/work exists create the directory there. Do NOT set delete on exit. Do NOT delete contents if dir already exists.
  2. Iff WEB-INF/work exists create the directory there. Do NOT set delete on exit. Do NOT delete contents if dir already exists.
  3. Else create dir in $(java.io.tmpdir). Set delete on exit. Delete contents if dir already exists.