Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Jetty/Howto/Configure Jetty"
m |
m |
||
Line 63: | Line 63: | ||
== Finally == | == Finally == | ||
Because Jetty configuration can be considered as calling setters on a collection of POJOs, regardless of the actual method used, the [http://download.eclipse.org/jetty/stable-7/apidocs/ apidocs] are the ultimate resource for configuration. | Because Jetty configuration can be considered as calling setters on a collection of POJOs, regardless of the actual method used, the [http://download.eclipse.org/jetty/stable-7/apidocs/ apidocs] are the ultimate resource for configuration. | ||
+ | |||
+ | === References === | ||
+ | <references/> |
Revision as of 12:04, 12 August 2010
Introduction
Configuring jetty consists of building a network of connectors and handlers and providing their individual configurations. It is a combination of
- HTTP server configuration (ports, thread pools, buffers, etc.)
- Web container configuration (webapps deployment, security realms, JNDI etc.)
- Web application (init parameters, non standard options, etc.)
See Jetty Architecture for a graphical representation of the interactions among connectors and handlers.
Configuring Jetty
Since Jetty components are simply Plain Old Java Objects (POJOs), you can accomplish this assembly and configuration of Jetty by a variety of techniques:
#Using Your Favorite Dependency Injection Framework: Spring, XBean
#Using Jetty WebApp and Context Deployers
In Code
See the examples in the Jetty 7 Latest Source XRef.
Using Jetty XML
Jetty XML offers XML equivalents to code. It is based on Java's Reflection API. Classes in the java.lang.reflect represent Java methods and classes, such that you can instantiate objects and invoke their methods based on their names and argument types. Behind the scenes, Jetty's XML config parser translates the XML elements and attributes into Reflection calls.[1]
Cite error: <ref>
tags exist, but no <references/>
tag was found