Jump to: navigation, search

Difference between revisions of "Jetty/Howto/Configure Jetty"

< Jetty‎ | Howto
m
m
Line 8: Line 8:
 
== Configuring Jetty ==
 
== Configuring Jetty ==
 
Since Jetty components are simply Plain Old Java Objects (POJOs), you can accomplish this assembly and configuration of components by a variety of techniques:
 
Since Jetty components are simply Plain Old Java Objects (POJOs), you can accomplish this assembly and configuration of components by a variety of techniques:
* In code
+
 
* Using Jetty XML
+
[[#In code]]
* Embedding Jetty
+
 
* Using the Jetty Maven Plugin
+
[[#Using Jetty XML]]
* Using Your Favorite Dependency Injection Framework
+
 
** Configuring Jetty with Spring
+
[[#Embedding Jetty]]
** Configuring Jetty with XBean
+
 
* Using Jetty WebApp and Context Deployers
+
[[#Using the Jetty Maven Plugin]]
* Using Web XML Descriptors
+
 
 +
[[#Using Your Favorite Dependency Injection Framework: Spring, XBean]]
 +
 
 +
[[#Using Jetty WebApp and Context Deployers]]
 +
 
  
 
=== In Code ===
 
=== In Code ===
Line 31: Line 35:
 
[[Jetty/Feature/Jetty_Maven_Plugin|Jetty maven plugin]]
 
[[Jetty/Feature/Jetty_Maven_Plugin|Jetty maven plugin]]
  
=== Using Your Favorite Dependency Injection Framework ===
+
=== Using Your Favorite Dependency Injection Framework: Spring, XBean ===
  
 
==== Configuring Jetty with [http://www.springsource.org/ Spring] ====
 
==== Configuring Jetty with [http://www.springsource.org/ Spring] ====

Revision as of 16:52, 11 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 description 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 components by a variety of techniques:

#In code

#Using Jetty XML

#Embedding Jetty

#Using the Jetty Maven Plugin

#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

With Jetty XML - dependency injection style XML format. Jetty XML used with jetty.xml and other files

Embedding Jetty

Embedded Jetty

Using the Jetty Maven Plugin

Jetty maven plugin

Using Your Favorite Dependency Injection Framework: Spring, XBean

Configuring Jetty with Spring

Spring XML

Configuring Jetty with XBean

Using Jetty WebApp and Context Deployers

WebApp and Context Deployers

More

For more configuration references, see the Jetty Configuration Reference pages.

Finally

Because Jetty configuration can be considered as calling setters on a collection of POJOs, regardless of the actual method used, the apidocs are the ultimate resource for configuration.