Jetty example source code file (index.xml)
This example Jetty source code file (index.xml) is included in the DevDaily.com
"Java Source Code
Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.
<span>Jetty is an open-source, standards-based, full-featured web server
implemented entirely in Java. It is released under the Apache 2.0
<a href="LICENSE.TXT">licence and is therefore free for
commercial use and distribution. First created in 1995, Jetty has
benefitted from input from a vast user community and consistent and
focused development by a stable core of lead developers. There are many
more examples of Jetty in action on the <a href="http://docs.codehaus.org/display/JETTY/Jetty+Powered">Jetty Powered Page
that has selections from among the tens of thousands of production Jetty instances. However, as
Jetty aims to be as unobtrusive as possible, countless websites and
products are based around Jetty, but Jetty is invisible!
<b>Full commercial support, training and development services for Jetty
and Jetty-based projects are available from <a href="http://www.webtide.com/">Webtide.
Jetty can be used as:
<li>a stand-alone traditional web server for static and dynamic content
<li>a dynamic content server behind a dedicated HTTP server such as Apache using mod_proxy
<li>an embedded component within a java application
This flexibility means that Jetty can be encountered in a number of different contexts:
<li>shipped with products to provide out-of-the-box useability eg Tapestry, Liferay
<li>distributed on CDs with books to make examples and exercises ready-to-run
<li>incorporated into applications as a HTTP transport eg JXTA, MX4J
<li>integrated as a web container in JavaEE app servers eg JOnAS, Geronimo, JBoss, JFox
<li>included as a component of an application eg Continuum, FishEye, Maven
Some of the defining features of Jetty are:
The guiding principle of Jetty could be said to be "simplicity not complexity". We want to make Jetty easy to understand and use:
<li>Configuration is either by API or by xml file
<li>Xml file syntax is a straightforward mapping from the API operating on POJOs
<li>Default configuration files make Jetty useable out-of-the-box
<li>Minimal number of lines required to embed a Jetty instance
In asynchronous Web 2.0 type applications using techniques such as AJAX,
connections stay open longer than when serving static pages, and thread
and memory requirements can escalate drastically. Infrastructure must
handle that gracefully lest an individual component, such as a slow
database connection stop an entire site because of a lack of threads.
<li>Performance degrades gracefully under stress for high quality of service
<li>Working Within the framework of existing web specificiations, handle large user loads and long-lived sessions with continuations
<li>Integrations available to clustering options such as WADI and Terracotta
A lot of effort goes into optimizing Jetty's performance and crafting the code so as to make the footprint as small as possible:
<li>Dependencies are kept to the absolute minimum
<li>The core is kept small with extra functionality in optional jars
<li>Scalability is a key concern
<li>Performance degrades gracefully under stress
Jetty is designed to be a good component. This means that it can easily be embedded in an application without forcing the application to adapt to it:
<li>Usage of dependency injection and inversion of control patterns
Jetty is architected for pluggability. The API allows different implementations of all of the principal Jetty components to be selected. At least one, but sometimes more, implementations of a component are always provided. However if these do not meet your needs, you are free to code your own using the interfaces and abstract classes as a basis. This means that Jetty can be easily customised to a particular application environment. This is particularly useful when Jetty is acting as the web container in a JavaEE server, as Jetty's pluggability ensures a tight integration with a host container.
The Jetty index.xml source code
<link REL="icon" HREF="./images/jicon.gif" TYPE="image/gif"/>
<iframe src="http://www.webtide.com/include/inc_offers.jsp" class="offers">
<a href="http://www.webtide.com">Webtide special offers
<iframe src="http://www.webtide.com/include/inc_blogs.jsp" class="study">
<a href="http://blogs.webtide.com">Blogs about Jetty.
Other Jetty examples (source code examples)
Here is a short list of links related to this Jetty index.xml source code file:
Copyright 1998-2011 Alvin Alexander, devdaily.com
All Rights Reserved.