blob: 78b7f0db02550e45b879d86f4dff0c8614733c6f [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="SMILA/Documentation/JettyHttpServer,Jetty,SMILA/Documentation/Bundle org.eclipse.smila.clusterconfig" />
<link rel="shortcut icon" href="http://wiki.eclipse.org/SMILA/Documentation/favicon.ico" />
<link rel="search" type="application/opensearchdescription+xml" href="http://wiki.eclipse.org/opensearch_desc.php" title="Eclipsepedia (English)" />
<link rel="alternate" type="application/rss+xml" title="Eclipsepedia RSS Feed" href="http://wiki.eclipse.org/index.php?title=Special:Recentchanges&amp;feed=rss" />
<link rel="alternate" type="application/atom+xml" title="Eclipsepedia Atom Feed" href="http://wiki.eclipse.org/index.php?title=Special:Recentchanges&amp;feed=atom" />
<title>SMILA/Documentation/JettyHttpServer - Eclipsepedia</title>
<style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "/skins/eclipsenova/novaWide.css?116"; /*]]>*/</style>
<link rel="stylesheet" type="text/css" media="print" href="http://wiki.eclipse.org/skins/eclipsenova/eclipsenovaPrint.css?116" />
<link rel="stylesheet" type="text/css" media="handheld" href="http://wiki.eclipse.org/skins/eclipsenova/handheld.css?116" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/header.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/tabs.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/visual.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/layout.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/footer.css" media="screen" />
<!--[if IE]><link rel="stylesheet" type="text/css" href="/skins/eclipsenova/IEpngfix.css" media="screen" /><![endif]-->
<!--[if lt IE 5.5000]><style type="text/css">@import "/skins/eclipsenova/IE50Fixes.css?116";</style> <![endif]-->
<!--[if IE 5.5000]><style type="text/css">@import "/skins/eclipsenova/IE55Fixes.css?116";</style><![endif]-->
<!--[if IE 6]><style type="text/css">@import "/skins/eclipsenova/IE60Fixes.css?116";</style><![endif]-->
<!--[if IE 7]><style type="text/css">@import "/skins/eclipsenova/IE70Fixes.css?116";</style><![endif]-->
<!--[if lt IE 7]><script type="text/javascript" src="/skins/common/IEFixes.js?116"></script>
<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
<script type= "text/javascript">/*<![CDATA[*/
var skin = "eclipsenova";
var stylepath = "/skins";
var wgArticlePath = "/$1";
var wgScriptPath = "";
var wgScript = "/index.php";
var wgServer = "http://wiki.eclipse.org";
var wgCanonicalNamespace = "";
var wgCanonicalSpecialPageName = false;
var wgNamespaceNumber = 0;
var wgPageName = "SMILA/Documentation/JettyHttpServer";
var wgTitle = "SMILA/Documentation/JettyHttpServer";
var wgAction = "view";
var wgRestrictionEdit = [];
var wgRestrictionMove = [];
var wgArticleId = "30164";
var wgIsArticle = true;
var wgUserName = null;
var wgUserGroups = null;
var wgUserLanguage = "en";
var wgContentLanguage = "en";
var wgBreakFrames = false;
var wgCurRevisionId = "285962";
var wgVersion = "1.12.0";
var wgEnableAPI = true;
var wgEnableWriteAPI = false;
/*]]>*/</script>
<script type="text/javascript" src="http://wiki.eclipse.org/skins/common/wikibits.js?116"><!-- wikibits js --></script>
<!-- Performance mods similar to those for bug 166401 -->
<script type="text/javascript" src="http://wiki.eclipse.org/index.php?title=-&amp;action=raw&amp;gen=js&amp;useskin=eclipsenova"><!-- site js --></script>
<!-- Head Scripts -->
<script type="text/javascript" src="http://wiki.eclipse.org/skins/common/ajax.js?116"></script>
<style type="text/css">/*<![CDATA[*/
.source-xml {line-height: normal; font-size: medium;}
.source-xml li {line-height: normal;}
/**
* GeSHi Dynamically Generated Stylesheet
* --------------------------------------
* Dynamically generated stylesheet for xml
* CSS class: source-xml, CSS id:
* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter)
*/
.source-xml .de1, .source-xml .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;}
.source-xml {}
.source-xml .head {}
.source-xml .foot {}
.source-xml .imp {font-weight: bold; color: red;}
.source-xml .ln-xtra {color: #cc0; background-color: #ffc;}
.source-xml li {font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;}
.source-xml li.li2 {font-weight: bold;}
.source-xml .coMULTI {color: #808080; font-style: italic;}
.source-xml .es0 {color: #000099; font-weight: bold;}
.source-xml .br0 {color: #66cc66;}
.source-xml .st0 {color: #ff0000;}
.source-xml .nu0 {color: #cc66cc;}
.source-xml .sc0 {color: #00bbdd;}
.source-xml .sc1 {color: #ddbb00;}
.source-xml .sc2 {color: #339933;}
.source-xml .sc3 {color: #009900;}
.source-xml .re0 {color: #000066;}
.source-xml .re1 {font-weight: bold; color: black;}
.source-xml .re2 {font-weight: bold; color: black;}
/*]]>*/
</style>
<style type="text/css">/*<![CDATA[*/
@import "/index.php?title=MediaWiki:Geshi.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";
/*]]>*/
</style><style type="text/css">/*<![CDATA[*/
.source-javascript {line-height: normal; font-size: medium;}
.source-javascript li {line-height: normal;}
/**
* GeSHi Dynamically Generated Stylesheet
* --------------------------------------
* Dynamically generated stylesheet for javascript
* CSS class: source-javascript, CSS id:
* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter)
*/
.source-javascript .de1, .source-javascript .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;}
.source-javascript {}
.source-javascript .head {}
.source-javascript .foot {}
.source-javascript .imp {font-weight: bold; color: red;}
.source-javascript .ln-xtra {color: #cc0; background-color: #ffc;}
.source-javascript li {font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;}
.source-javascript li.li2 {font-weight: bold;}
.source-javascript .kw1 {color: #000066; font-weight: bold;}
.source-javascript .kw2 {color: #003366; font-weight: bold;}
.source-javascript .kw3 {color: #000066;}
.source-javascript .co1 {color: #009900; font-style: italic;}
.source-javascript .coMULTI {color: #009900; font-style: italic;}
.source-javascript .es0 {color: #000099; font-weight: bold;}
.source-javascript .br0 {color: #66cc66;}
.source-javascript .st0 {color: #3366CC;}
.source-javascript .nu0 {color: #CC0000;}
.source-javascript .me1 {color: #006600;}
.source-javascript .sc0 {}
.source-javascript .sc1 {}
.source-javascript .sc2 {}
.source-javascript .sc3 {}
.source-javascript .re0 {color: #0066FF;}
/*]]>*/
</style>
<style type="text/css">/*<![CDATA[*/
@import "/index.php?title=MediaWiki:Geshi.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";
/*]]>*/
</style><style type="text/css">/*<![CDATA[*/
.source-text {line-height: normal; font-size: medium;}
.source-text li {line-height: normal;}
/**
* GeSHi Dynamically Generated Stylesheet
* --------------------------------------
* Dynamically generated stylesheet for text
* CSS class: source-text, CSS id:
* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter)
*/
.source-text .de1, .source-text .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;}
.source-text {}
.source-text .head {}
.source-text .foot {}
.source-text .imp {font-weight: bold; color: red;}
.source-text .ln-xtra {color: #cc0; background-color: #ffc;}
.source-text li {font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;}
.source-text li.li2 {font-weight: bold;}
/*]]>*/
</style>
<style type="text/css">/*<![CDATA[*/
@import "/index.php?title=MediaWiki:Geshi.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";
/*]]>*/
</style><style type="text/css">/*<![CDATA[*/
.source-java {line-height: normal; font-size: medium;}
.source-java li {line-height: normal;}
/**
* GeSHi Dynamically Generated Stylesheet
* --------------------------------------
* Dynamically generated stylesheet for java
* CSS class: source-java, CSS id:
* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter)
*/
.source-java .de1, .source-java .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;}
.source-java {}
.source-java .head {}
.source-java .foot {}
.source-java .imp {font-weight: bold; color: red;}
.source-java .ln-xtra {color: #cc0; background-color: #ffc;}
.source-java li {font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;}
.source-java li.li2 {font-weight: bold;}
.source-java .kw1 {color: #7F0055; font-weight: bold;}
.source-java .kw2 {color: #7F0055; font-weight: bold;}
.source-java .kw3 {color: #000000; font-weight: normal}
.source-java .kw4 {color: #7F0055; font-weight: bold;}
.source-java .co1 {color: #3F7F5F; font-style: italic;}
.source-java .co2 {color: #3F7F5F;}
.source-java .co3 {color: #3F7F5F; font-style: italic; font-weight: bold;}
.source-java .coMULTI {color: #3F5FBF; font-style: italic;}
.source-java .es0 {color: #000000;}
.source-java .br0 {color: #000000;}
.source-java .st0 {color: #2A00ff;}
.source-java .nu0 {color: #000000;}
.source-java .me1 {color: #000000;}
.source-java .me2 {color: #000000;}
/*]]>*/
</style>
<style type="text/css">/*<![CDATA[*/
@import "/index.php?title=MediaWiki:Geshi.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";
/*]]>*/
</style><link rel="stylesheet" type="text/css" href="JettyHttpServer.html" /> </head>
<body class="mediawiki ns-0 ltr page-SMILA_Documentation_JettyHttpServer">
<div id="globalWrapper">
<div id="column-one">
<!-- Eclipse Additions for the Top Nav start here M. Ward-->
<div id="header">
<div id="header-graphic">
<img src="http://wiki.eclipse.org/skins/eclipsenova/eclipse.png" alt="Eclipse Wiki">
</div>
<!-- Pulled 101409 Mward -->
<div class="portlet" id="p-personal">
<div class="pBody">
<ul>
<li id="pt-login"><a href="http://wiki.eclipse.org/index.php?title=Special:Userlogin&amp;returnto=SMILA/Documentation/JettyHttpServer">Log in</a></li>
</ul>
</div>
</div>
<div id="header-icons">
<div id="sites">
<ul id="sitesUL">
<li><a href="http://www.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/eclipseIcon.png" width="28" height="28" alt="Eclipse Foundation" title="Eclipse Foundation" /><div>Eclipse Foundation</div></a></li>
<li><a href="http://marketplace.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/marketplace.png" width="28" height="28" alt="Eclipse Marketplace" title="Eclipse Marketplace" /><div>Eclipse Marketplace</div></a></li>
<li><a href="https://bugs.eclipse.org/bugs"><img src="http://dev.eclipse.org/custom_icons/system-search-bw.png" width="28" height="28" alt="Bugzilla" title="Bugzilla" /><div>Bugzilla</div></a></li>
<li><a href="http://live.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/audio-input-microphone-bw.png" width="28" height="28" alt="Live" title="Live" /><div>Eclipse Live</div></a></li>
<li><a href="http://planeteclipse.org"><img src="http://dev.eclipse.org/large_icons/devices/audio-card.png" width="28" height="28" alt="PlanetEclipse" title="Planet" /><div>Planet Eclipse</div></a></li>
<li><a href="http://portal.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/preferences-system-network-proxy-bw.png" width="28" height="28" alt="Portal" title="Portal" /><div>My Foundation Portal</div></a></li>
</ul>
</div>
</div>
</div>
<!-- NEW HEADER STUFF HERE -->
<div id="header-menu">
<div id="header-nav">
<ul> <li><a class="first_one" href="http://wiki.eclipse.org/" target="_self">Home</a></li> <li><a href="http://www.eclipse.org/downloads/" target="_self">Downloads</a></li>
<li><a href="http://www.eclipse.org/users/" target="_self">Users</a></li>
<li><a href="http://www.eclipse.org/membership/" target="_self">Members</a></li>
<li><a href="http://wiki.eclipse.org/index.php/Development_Resources" target="_self">Committers</a></li>
<li><a href="http://www.eclipse.org/resources/" target="_self">Resources</a></li>
<li><a href="http://www.eclipse.org/projects/" target="_self">Projects</a></li>
<li><a href="http://www.eclipse.org/org/" target="_self">About Us</a></li>
</ul>
</div>
<div id="header-utils">
<!-- moved the search window here -->
<form action="http://wiki.eclipse.org/Special:Search" >
<input class="input" name="search" type="text" accesskey="f" value="" />
<input type='submit' onclick="this.submit();" name="go" id="searchGoButton" class="button" title="Go to a page with this exact name if one exists" value="Go" />&nbsp;
<input type='submit' onclick="this.submit();" name="fulltext" class="button" id="mw-searchButton" title="Search Eclipsepedia for this text" value="Search" />
</form>
</div>
</div>
<!-- Eclipse Additions for the Header stop here -->
<!-- Additions and mods for leftside nav Start here -->
<!--Started nav rip here-->
<!-- these are the nav controls main page, changes etc -->
<div id="novaContent" class="faux">
<div id="leftcol">
<ul id="leftnav">
<!-- these are the page controls, edit history etc -->
<li class="separator"><a class="separator">Navigation &#160;&#160;</li>
<li id="n-mainpage"><a href="http://wiki.eclipse.org/Main_Page">Main Page</a></li>
<li id="n-portal"><a href="http://wiki.eclipse.org/Eclipsepedia:Community_Portal">Community portal</a></li>
<li id="n-currentevents"><a href="http://wiki.eclipse.org/Eclipsepedia:Current_events">Current events</a></li>
<li id="n-recentchanges"><a href="http://wiki.eclipse.org/Special:Recentchanges">Recent changes</a></li>
<li id="n-randompage"><a href="http://wiki.eclipse.org/Special:Random">Random page</a></li>
<li id="n-help"><a href="http://wiki.eclipse.org/Help:Contents">Help</a></li>
<li class="separator"><a class="separator">Toolbox &#160;&#160;</a></li>
<li id="t-whatlinkshere"><a href="http://wiki.eclipse.org/Special:Whatlinkshere/SMILA/Documentation/JettyHttpServer">What links here</a></li>
<li id="t-recentchangeslinked"><a href="http://wiki.eclipse.org/Special:Recentchangeslinked/SMILA/Documentation/JettyHttpServer">Related changes</a></li>
<!-- This is the toolbox section -->
<li id="t-upload"><a href="http://wiki.eclipse.org/Special:Upload">Upload file</a></li>
<li id="t-specialpages"><a href="http://wiki.eclipse.org/Special:Specialpages">Special pages</a></li>
<li id="t-print"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/JettyHttpServer&amp;printable=yes">Printable version</a></li> <li id="t-permalink"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/JettyHttpServer&amp;oldid=285962">Permanent link</a></li> </ul>
</div>
<!-- Additions and mods for leftside nav End here -->
<div id="column-content">
<div id="content">
<a name="top" id="top"></a>
<div id="tabs">
<ul class="primary">
<li class="active"><a href="JettyHttpServer.html"><span class="tab">Page</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=Talk:SMILA/Documentation/JettyHttpServer&amp;action=edit"><span class="tab">Discussion</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/JettyHttpServer&amp;action=edit"><span class="tab">View source</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/JettyHttpServer&amp;action=history"><span class="tab">History</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=Special:Userlogin&amp;returnto=SMILA/Documentation/JettyHttpServer"><span class="tab">Edit</span></a></li>
</ul>
</div>
<script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
<h1 class="firstHeading">SMILA/Documentation/JettyHttpServer</h1>
<div id="bodyContent">
<h3 id="siteSub">From Eclipsepedia</h3>
<div id="contentSub"><span class="subpages">&lt; <a href="../../SMILA.html" title="SMILA">SMILA</a> | <a href="../Documentation.1.html" title="SMILA/Documentation">Documentation</a></span></div>
<div id="jump-to-nav">Jump to: <a href="JettyHttpServer.html#column-one">navigation</a>, <a href="JettyHttpServer.html#searchInput">search</a></div> <!-- start content -->
<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1"><a href="JettyHttpServer.html#Configuration_and_Usage_of_the_Jetty_HTTP_server_embedded_in_SMILA"><span class="tocnumber">1</span> <span class="toctext">Configuration and Usage of the Jetty HTTP server embedded in SMILA</span></a>
<ul>
<li class="toclevel-2"><a href="JettyHttpServer.html#Overview"><span class="tocnumber">1.1</span> <span class="toctext">Overview</span></a></li>
<li class="toclevel-2"><a href="JettyHttpServer.html#Configuration"><span class="tocnumber">1.2</span> <span class="toctext">Configuration</span></a></li>
<li class="toclevel-2"><a href="JettyHttpServer.html#Usage"><span class="tocnumber">1.3</span> <span class="toctext">Usage</span></a>
<ul>
<li class="toclevel-3"><a href="JettyHttpServer.html#Deployment_via_jetty.xml"><span class="tocnumber">1.3.1</span> <span class="toctext">Deployment via jetty.xml</span></a></li>
<li class="toclevel-3"><a href="JettyHttpServer.html#HttpHandler_services"><span class="tocnumber">1.3.2</span> <span class="toctext">HttpHandler services</span></a></li>
<li class="toclevel-3"><a href="JettyHttpServer.html#RequestDispatcher_and_RequestHandler_services"><span class="tocnumber">1.3.3</span> <span class="toctext">RequestDispatcher and RequestHandler services</span></a></li>
<li class="toclevel-3"><a href="JettyHttpServer.html#JSON_Handlers"><span class="tocnumber">1.3.4</span> <span class="toctext">JSON Handlers</span></a>
<ul>
<li class="toclevel-4"><a href="JettyHttpServer.html#Attachments"><span class="tocnumber">1.3.4.1</span> <span class="toctext">Attachments</span></a></li>
</ul>
</li>
<li class="toclevel-3"><a href="JettyHttpServer.html#JettyHandler_services"><span class="tocnumber">1.3.5</span> <span class="toctext">JettyHandler services</span></a>
<ul>
<li class="toclevel-4"><a href="JettyHttpServer.html#ResourceHandlerService"><span class="tocnumber">1.3.5.1</span> <span class="toctext">ResourceHandlerService</span></a></li>
<li class="toclevel-4"><a href="JettyHttpServer.html#ServletContextService"><span class="tocnumber">1.3.5.2</span> <span class="toctext">ServletContextService</span></a></li>
<li class="toclevel-4"><a href="JettyHttpServer.html#WebappContextService"><span class="tocnumber">1.3.5.3</span> <span class="toctext">WebappContextService</span></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
<a name="Configuration_and_Usage_of_the_Jetty_HTTP_server_embedded_in_SMILA"></a><h2> <span class="mw-headline"> Configuration and Usage of the Jetty HTTP server embedded in SMILA </span></h2>
<a name="Overview"></a><h3> <span class="mw-headline"> Overview </span></h3>
<p>The embedding of the Jetty server is implemented in bundle <tt>org.eclipse.smila.http.server</tt>. When the bundle is activated it starts the OSGi service <tt>org.eclipse.smila.http.server.HttpService</tt> which in turn creates a Jetty server from a configuration file, adds request handlers provided by other OSGi services and starts the server.
</p>
<a name="Configuration"></a><h3> <span class="mw-headline"> Configuration </span></h3>
<p>To configure the embedded Jetty server, place a file named <tt>jetty.xml</tt> in the configuration directory <tt>configuration/org.eclipse.smila.http.server</tt>. If the configuration area does not contain such a file, a default file provided by the HTTP server bundle itself is used. It's probably the most simple file possible:
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-xml"><span class="sc3"><span class="re1">&lt;Configure</span> <span class="re0">id</span>=<span class="st0">&quot;Server&quot;</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.jetty.server.Server&quot;</span><span class="re2">&gt;</span></span>
&nbsp;
<span class="sc3"><span class="coMULTI">&lt;!-- =========================================================== --&gt;</span></span>
<span class="sc3"><span class="coMULTI">&lt;!-- Server Thread Pool --&gt;</span></span>
<span class="sc3"><span class="coMULTI">&lt;!-- =========================================================== --&gt;</span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;ThreadPool&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="coMULTI">&lt;!-- Default queued blocking threadpool --&gt;</span></span>
<span class="sc3"><span class="re1">&lt;New</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.jetty.util.thread.QueuedThreadPool&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;minThreads&quot;</span><span class="re2">&gt;</span></span>10<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;maxThreads&quot;</span><span class="re2">&gt;</span></span>200<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;detailedDump&quot;</span><span class="re2">&gt;</span></span>false<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/New<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
&nbsp;
<span class="sc3"><span class="coMULTI">&lt;!-- =========================================================== --&gt;</span></span>
<span class="sc3"><span class="coMULTI">&lt;!-- Set connectors --&gt;</span></span>
<span class="sc3"><span class="coMULTI">&lt;!-- =========================================================== --&gt;</span></span>
&nbsp;
<span class="sc3"><span class="re1">&lt;Call</span> <span class="re0">name</span>=<span class="st0">&quot;addConnector&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;Arg<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;New</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.jetty.server.nio.SelectChannelConnector&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;host&quot;</span><span class="re2">&gt;</span></span><span class="sc3"><span class="re1">&lt;Property</span> <span class="re0">name</span>=<span class="st0">&quot;jetty.host&quot;</span> <span class="re2">/&gt;</span></span><span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;port&quot;</span><span class="re2">&gt;</span></span><span class="sc3"><span class="re1">&lt;Property</span> <span class="re0">name</span>=<span class="st0">&quot;jetty.port&quot;</span> <span class="re0">default</span>=<span class="st0">&quot;8080&quot;</span><span class="re2">/&gt;</span></span><span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;maxIdleTime&quot;</span><span class="re2">&gt;</span></span>300000<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;Acceptors&quot;</span><span class="re2">&gt;</span></span>2<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;statsOn&quot;</span><span class="re2">&gt;</span></span>false<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;confidentialPort&quot;</span><span class="re2">&gt;</span></span>8443<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;lowResourcesConnections&quot;</span><span class="re2">&gt;</span></span>20000<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;lowResourcesMaxIdleTime&quot;</span><span class="re2">&gt;</span></span>5000<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/New<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/Arg<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/Call<span class="re2">&gt;</span></span></span>
&nbsp;
<span class="sc3"><span class="coMULTI">&lt;!-- =========================================================== --&gt;</span></span>
<span class="sc3"><span class="coMULTI">&lt;!-- Set handler Collection Structure --&gt;</span></span>
<span class="sc3"><span class="coMULTI">&lt;!-- =========================================================== --&gt;</span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;handler&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;New</span> <span class="re0">id</span>=<span class="st0">&quot;DefaultHandler&quot;</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.jetty.server.handler.DefaultHandler&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
&nbsp;
<span class="sc3"><span class="coMULTI">&lt;!-- =========================================================== --&gt;</span></span>
<span class="sc3"><span class="coMULTI">&lt;!-- extra options --&gt;</span></span>
<span class="sc3"><span class="coMULTI">&lt;!-- =========================================================== --&gt;</span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;stopAtShutdown&quot;</span><span class="re2">&gt;</span></span>true<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;sendServerVersion&quot;</span><span class="re2">&gt;</span></span>true<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;sendDateHeader&quot;</span><span class="re2">&gt;</span></span>true<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;gracefulShutdown&quot;</span><span class="re2">&gt;</span></span>1000<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;dumpAfterStart&quot;</span><span class="re2">&gt;</span></span>false<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;dumpBeforeStop&quot;</span><span class="re2">&gt;</span></span>false<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/Configure<span class="re2">&gt;</span></span></span></pre></div>
<p>The default configuration is not especially useful by itself. It basically configures the server to listen at port 8080, adds a default handler responding with HTTP status 404 (NOT FOUND) if no other handler was found to handle the request, and lists the available handlers.
</p><p>For more details on all the configuration properties used here, refer to the <a href="http://wiki.eclipse.org/Jetty" title="Jetty">Jetty documentation</a> next door.
</p><p>Please note that if you use a <tt>ClusterConfigService</tt> implementation (see <a href="Bundle_org.eclipse.smila.clusterconfig.html" title="SMILA/Documentation/Bundle org.eclipse.smila.clusterconfig">Bundle org.eclipse.smila.clusterconfig</a>, the http port defined there for the <tt>smila</tt> service will be used for the HTTP Server and thus overrides the port setting from the <tt>jetty.xml</tt> file.
</p><p>Snippet from <tt>clusterconfig.json</tt> that overwrites the http port:
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-javascript"><span class="st0">&quot;services&quot;</span>:<span class="br0">&#123;</span>
<span class="st0">&quot;smila&quot;</span>:<span class="br0">&#123;</span>
<span class="st0">&quot;httpPort&quot;</span>:<span class="nu0">8080</span>
<span class="br0">&#125;</span>
<span class="br0">&#125;</span></pre></div>
<p><span style="float:right; color:blue; padding-left: 2em; border: 1px dashed #D9D9D9;">
To be exact: the service name will be determined by the <tt>serviceName</tt> property of the HTTP service component definition for the service implementation <tt>org.eclipse.smila.http.server.internal.HttpServiceImpl</tt>. If (and only if) this property and the <tt>ClusterConfigService</tt> are both available, the <tt>ClusterConfigService</tt> service will be called to determine the configured http port for the service by calling its <tt>int getHttpPort(final String serviceName)</tt> method. If the result is not <tt>-1</tt> it will be set as the HTTP port for the HttpService. Otherwise the port as defined in the <tt>jetty.xml</tt> file will be used.
</span>
</p>
<a name="Usage"></a><h3> <span class="mw-headline"> Usage </span></h3>
<p>Handlers can be added using two different approaches: Either by extending the <tt>jetty.xml</tt> file, or by registering different kinds of OSGi services that are referenced by the HTTP server service and are registered at startup.
</p><p>Before we dive into the details, first some important advices:
</p>
<ul><li> To implement functionality, you will probably provide new classes in your own bundle. If the HTTP server needs to instantiate these classes (e.g. servlets used by a web application), you must register your bundle as a "buddy" to the server bundle. So, if you have problems deploying your own code and if you get class loading related errors, first check if your <tt>MANIFEST.MF</tt> contains this line:
</li></ul>
<div dir="ltr" style="text-align: left;"><pre class="source-text">Eclipse-RegisterBuddy: org.eclipse.smila.http.server</pre></div>
<ul><li> You also must add these two imports to the manifest, otherwise the handlers will not be registered with the http server, despite being instantiated:
</li></ul>
<div dir="ltr" style="text-align: left;"><pre class="source-text">org.eclipse.smila.http.server, org.eclipse.smila.http.server.util</pre></div>
<ul><li> The Jetty server must be stopped and restarted to register additional handlers. Therefore, if you use OSGi services to register functionality in the server, you should take care that the HTTP server bundle is started in a higher run level than all bundles providing handler services. This is the reason why the HTTP server is started on the highest run level of all bundles in the SMILA application. A nice side effect of this is that you can check from outside if the startup of SMILA has finished: If you can connect to the HTTP server, this means that SMILA is up and running:
</li></ul>
<div dir="ltr" style="text-align: left;"><pre class="source-text">..., \
org.eclipse.smila.http.server@5:start</pre></div>
<ul><li> Also, you should not add handler services to the HTTP server bundle itself using Declarative Services, because the start order of DS services in a single bundle is not deterministic.
</li></ul>
<a name="Deployment_via_jetty.xml"></a><h4> <span class="mw-headline"> Deployment via jetty.xml </span></h4>
<p>The straightforward way is to use the <tt>jetty.xml</tt> configuration file itself to add handlers for different URL contexts. In theory, it should be possible to do everything you can normally do in this configuration file, see the <a href="http://wiki.eclipse.org/Jetty" title="Jetty">Jetty documentation</a> for details. However, there may be some class loading fun ahead.
</p><p>The default configuration file used in the SMILA application replaces the "handler" section of the default configuration to deploy a simple web application for search at <a href="http://localhost:8080/SMILA/search" class="external free" title="http://localhost:8080/SMILA/search" rel="nofollow">http://localhost:8080/SMILA/search</a>:
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-xml"><span class="sc3"><span class="coMULTI">&lt;!-- =========================================================== --&gt;</span></span>
<span class="sc3"><span class="coMULTI">&lt;!-- Set handler Collection Structure --&gt;</span></span>
<span class="sc3"><span class="coMULTI">&lt;!-- =========================================================== --&gt;</span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;handler&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;New</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.jetty.server.handler.HandlerList&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;handlers&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;Array</span> <span class="re0">type</span>=<span class="st0">&quot;org.eclipse.jetty.server.Handler&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;Item<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;New</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.jetty.webapp.WebAppContext&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;contextPath&quot;</span><span class="re2">&gt;</span></span>/SMILA<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;resourceBase&quot;</span><span class="re2">&gt;</span></span>configuration/org.eclipse.smila.search.servlet/webapp<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;descriptor&quot;</span><span class="re2">&gt;</span></span>configuration/org.eclipse.smila.search.servlet/webapp/WEB-INF/web.xml<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;defaultsDescriptor&quot;</span><span class="re2">&gt;</span></span>configuration/org.eclipse.smila.http.server/webdefault.xml<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;parentLoaderPriority&quot;</span><span class="re2">&gt;</span></span>true<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/New<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/Item<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Item<span class="re2">&gt;</span></span></span> <span class="sc3"><span class="coMULTI">&lt;!-- this one is always at the end of the list --&gt;</span></span>
<span class="sc3"><span class="re1">&lt;New</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.jetty.server.handler.DefaultHandler&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;/Item<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/Array<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/New<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span></pre></div>
<p>It registers a standard web application located at <tt>configuration/org.eclipse.smila.search.servlet/webapp</tt>. Note that you must also specify the <i>defaultsDescriptor</i> property because the embedded Jetty cannot find one at the default location.
</p><p><b>Example:</b> Adding an extra resource handler to serve static files. This makes files in directory <tt>/home/smila/Images</tt> accessible at <tt><a href="http://.../Images/" class="external free" title="http://.../Images/" rel="nofollow">http://.../Images/</a></tt>:
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-xml"><span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;handler&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;New</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.jetty.server.handler.HandlerList&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;handlers&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;Array</span> <span class="re0">type</span>=<span class="st0">&quot;org.eclipse.jetty.server.Handler&quot;</span><span class="re2">&gt;</span></span>
&nbsp;
<span class="sc3"><span class="coMULTI">&lt;!-- ... other handlers ... --&gt;</span></span>
&nbsp;
<span class="sc3"><span class="re1">&lt;Item<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;New</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.jetty.server.handler.ContextHandler&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;contextPath&quot;</span><span class="re2">&gt;</span></span>/Images<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;handler&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;New</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.jetty.server.handler.ResourceHandler&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;directoriesListed&quot;</span><span class="re2">&gt;</span></span>true<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;resourceBase&quot;</span><span class="re2">&gt;</span></span>/home/smila/Images<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/New<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/New<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/Item<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;Item<span class="re2">&gt;</span></span></span> <span class="sc3"><span class="coMULTI">&lt;!-- this one is always at the end of the list --&gt;</span></span>
<span class="sc3"><span class="re1">&lt;New</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.jetty.server.handler.DefaultHandler&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;/Item<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/Array<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/New<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span></pre></div>
<a name="HttpHandler_services"></a><h4> <span class="mw-headline"> HttpHandler services </span></h4>
<p><tt>org.eclipse.smila.http.server.HttpHandler</tt> is the most primitive SMILA specific interface for OSGi services for handling HTTP requests. It defines two methods:
</p>
<ul><li> <tt>String getRootContextPath()</tt>: return the context path (i.e. the part of the URL after the &quot;http://&lt;host&gt;:&lt;port&gt;&quot; stuff) for which this handler should be invoked. This is used by the HTTP server to select an appropriate handler for a request. The value must be a valid Jetty context path: The handler should be invoked for all requests to URI paths that start with this value.
</li><li> <tt>void handle(final HttpExchange exchange) throws IOException</tt>: Actually handle the request. The <tt>HttpExchange</tt> object gives access to the HTTP method, request URI, request headers and input stream as well as response headers and output stream.
</li></ul>
<p>See <tt>org.eclipse.smila.http.server.test.MockHttpHandler</tt> in the HTTP server test bundle for the most simple implementation of this services. <tt>OSGI-INF/httphandler.xml</tt> shows how to start such a server using DS.
</p>
<a name="RequestDispatcher_and_RequestHandler_services"></a><h4> <span class="mw-headline"> RequestDispatcher and RequestHandler services </span></h4>
<p>The <tt>org.eclipse.smila.http.server.util.RequestDispatcher</tt> is a HttpHandler implementation that uses <tt>org.eclipse.smila.http.server.util.RequestHandler</tt> services to handle requests for its root context. RequestHandlers are HttpHandlers but cannot register for handling URIs containing prefixes. Instead, the dispatcher calls <tt>matches(String requestUri)</tt> and the RequestHandler can check programmatically if it should handle this request. Also, the dispatcher can add and remove request handlers without having to restart the complete HTTP server. To use a RequestDispatcher, you must start it using a DS descriptor. E.g. see the example in the <tt>...http.server.test</tt> bundle in <tt>OSGI-INF/requestdispatcher.xml</tt>:
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-xml"><span class="sc3"><span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span> <span class="re0">encoding</span>=<span class="st0">&quot;UTF-8&quot;</span><span class="re2">?&gt;</span></span>
<span class="sc3"><span class="re1">&lt;component</span> <span class="re0">name</span>=<span class="st0">&quot;org.eclipse.smila.http.server.util.RequestDispatcher&quot;</span> <span class="re0">immediate</span>=<span class="st0">&quot;true&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;implementation</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.http.server.util.RequestDispatcher&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;service<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;provide</span> <span class="re0">interface</span>=<span class="st0">&quot;org.eclipse.smila.http.server.HttpHandler&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;/service<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;reference</span>
<span class="re0">name</span>=<span class="st0">&quot;RequestHandlers&quot;</span>
<span class="re0">interface</span>=<span class="st0">&quot;org.eclipse.smila.http.server.util.RequestHandler&quot;</span>
<span class="re0">bind</span>=<span class="st0">&quot;addRequestHandler&quot;</span>
<span class="re0">unbind</span>=<span class="st0">&quot;removeRequestHandler&quot;</span>
<span class="re0">cardinality</span>=<span class="st0">&quot;0..n&quot;</span>
<span class="re0">policy</span>=<span class="st0">&quot;dynamic&quot;</span>
<span class="re0">target</span>=<span class="st0">&quot;(rootContextPath=/dispatch)&quot;</span>
<span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;/component<span class="re2">&gt;</span></span></span></pre></div>
<p>This starts a dispatcher for the root context "/dispatch", i.e. it tries to handle all requests to <tt>http://host:port/dispatch...</tt> and uses all RequestHandler services that have a property <i>rootContextPath</i> set to "/dispatch". You can add this description to your own bundles to start several dispatchers for different root contexts, just be sure to import the bundles <tt>org.eclipse.smila.http.server</tt> and <tt>org.eclipse.smila.http.server.util</tt> even if they are not needed by the actual code.
</p><p>We provide also a base class for RequestHandlers named <tt>org.eclipse.smila.http.server.util.ARequestHandler</tt> which implements the <tt>matches()</tt> method matching the URI part after the root context path using a regular expression string read from its own component properties specified in the DS file. E.g. in the test bundle we have <tt>OSGI-INF/requesthandler.xml</tt>:
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-xml"><span class="sc3"><span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span> <span class="re0">encoding</span>=<span class="st0">&quot;UTF-8&quot;</span><span class="re2">?&gt;</span></span>
<span class="sc3"><span class="re1">&lt;component</span> <span class="re0">name</span>=<span class="st0">&quot;org.eclipse.smila.http.server.test.MockRequestHandler&quot;</span> <span class="re0">immediate</span>=<span class="st0">&quot;true&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;implementation</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.http.server.test.MockRequestHandler&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;service<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;provide</span> <span class="re0">interface</span>=<span class="st0">&quot;org.eclipse.smila.http.server.util.RequestHandler&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;/service<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;property</span> <span class="re0">name</span>=<span class="st0">&quot;rootContextPath&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;String&quot;</span> <span class="re0">value</span>=<span class="st0">&quot;/dispatch&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;property</span> <span class="re0">name</span>=<span class="st0">&quot;uriPattern&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;String&quot;</span> <span class="re0">value</span>=<span class="st0">&quot;/handle/([^/]+)/?$&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;/component<span class="re2">&gt;</span></span></span></pre></div>
<p>This starts a simple RequestHandler service managed by the dispatcher described above and reacts on requests to <tt>http://host:port/dispatch/handle/&lt;string-without-further-slashes&gt;</tt>. Also, the base class provides methods to extract the parts of the request URI matched by the groups in the regular expression.
</p>
<a name="JSON_Handlers"></a><h4> <span class="mw-headline"> JSON Handlers </span></h4>
<p>SMILA provides some base classes that make it quite easy to write handlers that receive requests and produce results using <a href="http://json.org/" class="external text" title="http://json.org/" rel="nofollow">JSON</a>. JSON is a very lightweight data format that makes interchange much more efficient than using XML. Moreover it is easy to interpret in Javascript based web user interfaces. Currently the following base classes are available in package <tt>org.eclipse.smila.http.server.json</tt>:
</p>
<ul><li> JsonHttpHandler: implements the HttpHandler interface
</li><li> JsonRequestHandler: implements the RequestHandler interface and extends ARequestHandler
</li><li> JsonBulkRequestHandler: implements the RequestHandler interface and extends ARequestHandler. Can take multiple JSON objects as input, but (normally) does not produce a result object. [Note: a result may be produced by the finish method and will be returned in the response as JSON.]
</li></ul>
<p>The first two handler expect a single record as input to be processed (of course, the record can be empty). The record is either parsed from a JSON request body (in POST or PUT requests) or constructed from the request parameters (in a GET request) and then a <tt>process()</tt> method implemented by the subclass is invoked with this record to do the actual processing. The result may be a single object, preferably a SMILA Record or Any object.
</p><p>The latter handler expects a JSON "bulk" as its input. A bulk is a set of JSON Objects, each one printed on a single line (i.e. no newline or linefeed characters) and seperated by newline characters. The bulk is parsed and sent to a <tt>process()</tt> method implemented in a subclass one by one, so this handler makes it possible to push a lot of records into SMILA in a single request with high performance and low memory usage. After the complete bulk has been processed successfully, a <tt>finish()</tt> method implemented by the subclass is called to finalize the processing if necessary. A result produced by the finish method will be returned as a response.
</p><p>The first handler is meant to be managed by the Http service immediately (register as HttpHandler) while the latter two are managed by a RequestDispatcher service (register them as RequestHandlers).
</p><p>Other methods you may want to override in subclasses to customize the behavior depending on HTTP method used to invoke the handler, the actual request URI, input and output objects and exceptions throwm by the <tt>process</tt> method:
</p>
<ul><li> <tt>isValidMethod</tt>: Checks if the HTTP method is allowed for this handler. If not, a METHOD-NOT-ALLOWED status is returned to the client. By default only POST is allowed.
</li><li> <tt>getSuccessStatus</tt>: HTTP status to return after successful processing. Default is ACCEPTED for the bulk handler and OK for the others.
</li><li> <tt>writeResultObject</tt>: Add additional Object-to-JSON-serialization code if you do not return a SMILA Record or Any object or something else that can be serialized using a standard <a href="http://wiki.fasterxml.com/ObjectMapper" class="external text" title="http://wiki.fasterxml.com/ObjectMapper" rel="nofollow">Jackson ObjectMapper</a>. The latter usually works fine for Java objects like Collections or Maps or Beans.
</li><li> <tt>getErrorStatus</tt>: HTTP status to return after failed processing, depending on the action exception. See the default implementation for the predefined mapping from exception type to status code.
</li></ul>
<a name="Attachments"></a><h5> <span class="mw-headline"> Attachments </span></h5>
<p><tt>JsonHttpHandler</tt> and <tt>JsonRequestHandler</tt> support attachments for input records in POST requests, too. Such records must be sent as "multipart" requests, where the first part contains the record metadata as JSON, followed by binary parts.
</p><p>For example, to submit a record with an attachment to a job (which is the main use case for sending attachments to SMILA), you can use the <a href="http://hc.apache.org/httpcomponents-client-ga/index.html" class="external text" title="http://hc.apache.org/httpcomponents-client-ga/index.html" rel="nofollow">Apache HttpClient 4.x</a> (not included with SMILA, however):
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-java"><span class="kw1">import</span> org.<span class="me1">apache</span>.<span class="me1">http</span>.<span class="me1">HttpResponse</span>;
<span class="kw1">import</span> org.<span class="me1">apache</span>.<span class="me1">http</span>.<span class="me1">HttpStatus</span>;
<span class="kw1">import</span> org.<span class="me1">apache</span>.<span class="me1">http</span>.<span class="me1">client</span>.<span class="me1">HttpClient</span>;
<span class="kw1">import</span> org.<span class="me1">apache</span>.<span class="me1">http</span>.<span class="me1">client</span>.<span class="me1">methods</span>.<span class="me1">HttpPost</span>;
<span class="kw1">import</span> org.<span class="me1">apache</span>.<span class="me1">http</span>.<span class="me1">entity</span>.<span class="me1">mime</span>.<span class="me1">MultipartEntity</span>;
<span class="kw1">import</span> org.<span class="me1">apache</span>.<span class="me1">http</span>.<span class="me1">entity</span>.<span class="me1">mime</span>.<span class="me1">content</span>.<span class="me1">ByteArrayBody</span>;
<span class="kw1">import</span> org.<span class="me1">apache</span>.<span class="me1">http</span>.<span class="me1">entity</span>.<span class="me1">mime</span>.<span class="me1">content</span>.<span class="me1">StringBody</span>;
<span class="kw1">import</span> org.<span class="me1">apache</span>.<span class="me1">http</span>.<span class="me1">impl</span>.<span class="me1">client</span>.<span class="me1">DefaultHttpClient</span>;
...
<span class="kw3">String</span> jsonMetadata = ...;
<span class="kw4">byte</span><span class="br0">&#91;</span><span class="br0">&#93;</span> attachment = ...;
HttpClient client = <span class="kw1">new</span> DefaultHttpClient<span class="br0">&#40;</span><span class="br0">&#41;</span>;
MultipartEntity multiPartMessage = <span class="kw1">new</span> MultipartEntity<span class="br0">&#40;</span><span class="br0">&#41;</span>;
StringBody jsonPart = <span class="kw1">new</span> StringBody<span class="br0">&#40;</span>jsonMetadata,
<span class="st0">&quot;application/json&quot;</span>,
Charset.<span class="me1">forName</span><span class="br0">&#40;</span><span class="st0">&quot;UTF-8&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;
multiPartMessage.<span class="me1">addPart</span><span class="br0">&#40;</span><span class="st0">&quot;metadata&quot;</span>, jsonPart<span class="br0">&#41;</span>;
<span class="co1">// the actual name of the metadata part is irrelevant</span>
ByteArrayBody attachmentPart = <span class="kw1">new</span> ByteArrayBody<span class="br0">&#40;</span>attachment,
<span class="st0">&quot;application/octet-stream&quot;</span>,
<span class="kw2">null</span><span class="br0">&#41;</span>; <span class="co1">// no filename necessary</span>
multiPartMessage.<span class="me1">addPart</span><span class="br0">&#40;</span><span class="st0">&quot;content&quot;</span>, attachmentPart<span class="br0">&#41;</span>;
<span class="co1">// part name is the attachment name.</span>
HttpPost request = <span class="kw1">new</span> HttpPost<span class="br0">&#40;</span><span class="st0">&quot;http://localhost:8080/smila/job/&quot;</span> + jobName + <span class="st0">&quot;/record&quot;</span><span class="br0">&#41;</span>;
request.<span class="me1">setEntity</span><span class="br0">&#40;</span>multiPartMessage<span class="br0">&#41;</span>;
HttpResponse response = client.<span class="me1">execute</span><span class="br0">&#40;</span>request<span class="br0">&#41;</span>;
...</pre></div>
<p>The HTTP request than looks similar to this:
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-text">POST /smila/job/jobname/record
&nbsp;
Content-Length: 12345
Content-Type: multipart/form-data; boundary=UMFOMEI8xxUic4zcDix9Utn4ORyVTcS3
&nbsp;
--UMFOMEI8xxUic4zcDix9Utn4ORyVTcS3
Content-Disposition: form-data; name=&quot;metadata&quot;
Content-Type: application/json; charset=UTF-8
Content-Transfer-Encoding: 8bit
&nbsp;
{
&quot;_recordid&quot;: &quot;...&quot;,
// more attributes
}
--UMFOMEI8xxUic4zcDix9Utn4ORyVTcS3
Content-Disposition: form-data; name=&quot;content&quot;
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
&nbsp;
... attachment content ...
&nbsp;
--UMFOMEI8xxUic4zcDix9Utn4ORyVTcS3--</pre></div>
<p>The <tt>HttpClient</tt> lib provides additional <a href="http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/content/package-summary.html" class="external text" title="http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/content/package-summary.html" rel="nofollow"><tt>ContentBody</tt></a> implementations for adding parts from <tt>InputStream</tt>s or <tt>File</tt>s immediately instead of having to load them in memory first. Of course, you can also add multiple attachments to a single request, just add more parts with different attachment names.
</p><p>We have also introduced a size limit for incoming records to protect SMILA against OutOfMemoryErrors by client requests. The size limit can be configured in <tt>configuration/org.eclipse.smila.http.server/httpserver.properties</tt>, the default value is 1 GiB:
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-text"># maximum size of request records (including attachments) at the ReST API
# for JSON handlers that load the complete request data in memory (using JsonHttpUtils.convertRequest())
http.json.maxRequestRecordSize=1g</pre></div>
<p>Values can use "k" (KiB), "m" (MiB), "g" (GiB) suffixes for better readability. The value describes the maximum size of the complete request, i.e. JSON metadata plus all attachments. Bigger requests are rejected with response code <tt>400 BAD REQUEST</tt>. The limit does not concern handlers derived from <tt>JsonBulkRequestHandler</tt> or non-Json-handlers, as it should still be possible to implement "streaming handlers" that do not need to load the complete request in memory.
</p>
<a name="JettyHandler_services"></a><h4> <span class="mw-headline"> JettyHandler services </span></h4>
<p>An OSGi service providing <tt>org.eclipse.smila.http.JettyHandler</tt> can be used to inject original Jetty handlers programmatically into the server. A JettyHandler must implement two methods:
</p>
<ul><li> <tt>org.eclipse.jetty.server.Handler getHandler()</tt>: the initialized Jetty handler. If it is not already a ContextHandler, it is wrapped inside one automatically by the HttpService.
</li><li> <tt>String getRootContextPath()</tt>: the URI path prefix to be handled by this handler.
</li></ul>
<p>There is also a base class <tt>org.eclipse.smila.http.AJettyHandlerService</tt> available which reads the context path value from the DS component context and determines paths into the configuration area if the component context contains a bundle name for which access to the configuration space has been configured.
</p><p>We have already created three (partly prototypical) implementations of this service. They provide only quite limited means of configuring the Jetty handler themselves, so they are provided rather as examples, meaning you can use them to base your own handlers on. If you require more configuration, you will either have to create your own variant of these services or use the <tt>jetty.xml</tt> to achieve the desired deployment/configuration.
</p><p>The exemplary implementations (details follow below) are all contained in <tt>org.eclipse.smila.http.server.util</tt>.
</p>
<a name="ResourceHandlerService"></a><h5> <span class="mw-headline"> ResourceHandlerService </span></h5>
<p>Creates a Jetty ResourceHandler which can serve files from the configuration area. The test bundle shows how to use this in <tt>OSGI-INF/resourcehandler.xml</tt>:
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-xml"><span class="sc3"><span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span> <span class="re0">encoding</span>=<span class="st0">&quot;UTF-8&quot;</span><span class="re2">?&gt;</span></span>
<span class="sc3"><span class="re1">&lt;component</span> <span class="re0">name</span>=<span class="st0">&quot;org.eclipse.smila.http.server.util.ResourceHandlerService&quot;</span> <span class="re0">immediate</span>=<span class="st0">&quot;true&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;implementation</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.http.server.util.ResourceHandlerService&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;service<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;provide</span> <span class="re0">interface</span>=<span class="st0">&quot;org.eclipse.smila.http.server.JettyHandler&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;/service<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;property</span> <span class="re0">name</span>=<span class="st0">&quot;rootContextPath&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;String&quot;</span> <span class="re0">value</span>=<span class="st0">&quot;/resources&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;property</span> <span class="re0">name</span>=<span class="st0">&quot;configBundle&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;String&quot;</span> <span class="re0">value</span>=<span class="st0">&quot;org.eclipse.smila.http.server.test&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;property</span> <span class="re0">name</span>=<span class="st0">&quot;resourceBase&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;String&quot;</span> <span class="re0">value</span>=<span class="st0">&quot;resources&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;property</span> <span class="re0">name</span>=<span class="st0">&quot;welcomeFiles&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;String&quot;</span> <span class="re0">value</span>=<span class="st0">&quot;index.html&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;/component<span class="re2">&gt;</span></span></span></pre></div>
<p>This creates a ResourceHandler which can provide files from <tt>configuration/org.eclipse.smila.http.server.test/resources</tt> at the URL <tt>http://.../resources/...</tt>, and returns "index.html" for requests containing only a directory name and no explicit filename in the URL.
</p>
<a name="ServletContextService"></a><h5> <span class="mw-headline"> ServletContextService </span></h5>
<p>Creates and registers a ServletContextHandler with a single javax.servlet instance already created (so it may be helpful in case of classloading problems, because the servlet instance can be created inside its own bundle context). Again, you can find a simple example in the test bundle at <tt>OSGI-INF/servlethandler.xml</tt>:
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-xml"><span class="sc3"><span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span> <span class="re0">encoding</span>=<span class="st0">&quot;UTF-8&quot;</span><span class="re2">?&gt;</span></span>
<span class="sc3"><span class="re1">&lt;component</span> <span class="re0">name</span>=<span class="st0">&quot;org.eclipse.smila.http.server.util.ServletContextService&quot;</span> <span class="re0">immediate</span>=<span class="st0">&quot;true&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;implementation</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.http.server.util.ServletContextService&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;service<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;provide</span> <span class="re0">interface</span>=<span class="st0">&quot;org.eclipse.smila.http.server.JettyHandler&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;/service<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;property</span> <span class="re0">name</span>=<span class="st0">&quot;rootContextPath&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;String&quot;</span> <span class="re0">value</span>=<span class="st0">&quot;/servlet&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;property</span> <span class="re0">name</span>=<span class="st0">&quot;servletClassName&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;String&quot;</span> <span class="re0">value</span>=<span class="st0">&quot;org.eclipse.smila.http.server.test.MockServlet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;property</span> <span class="re0">name</span>=<span class="st0">&quot;servletPath&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;String&quot;</span> <span class="re0">value</span>=<span class="st0">&quot;/mock&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;/component<span class="re2">&gt;</span></span></span></pre></div>
<p>This registers an instance of the named class as a servlet which can be invoked using <tt>http://.../servlet/mock</tt>.
</p>
<a name="WebappContextService"></a><h5> <span class="mw-headline"> WebappContextService </span></h5>
<p>Creates a handler for a web application. The example from the test bundle is as follows:
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-xml"><span class="sc3"><span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span> <span class="re0">encoding</span>=<span class="st0">&quot;UTF-8&quot;</span><span class="re2">?&gt;</span></span>
<span class="sc3"><span class="re1">&lt;component</span> <span class="re0">name</span>=<span class="st0">&quot;org.eclipse.smila.http.server.util.WebappContextService&quot;</span> <span class="re0">immediate</span>=<span class="st0">&quot;true&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;implementation</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.http.server.util.WebappContextService&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;service<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;provide</span> <span class="re0">interface</span>=<span class="st0">&quot;org.eclipse.smila.http.server.JettyHandler&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;/service<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;property</span> <span class="re0">name</span>=<span class="st0">&quot;rootContextPath&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;String&quot;</span> <span class="re0">value</span>=<span class="st0">&quot;/webapp&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;property</span> <span class="re0">name</span>=<span class="st0">&quot;configBundle&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;String&quot;</span> <span class="re0">value</span>=<span class="st0">&quot;org.eclipse.smila.http.server.test&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;property</span> <span class="re0">name</span>=<span class="st0">&quot;webappDir&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;String&quot;</span> <span class="re0">value</span>=<span class="st0">&quot;webapp&quot;</span><span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;/component<span class="re2">&gt;</span></span></span></pre></div>
<p>This makes the web application available as <tt>http://.../webapp</tt> in the directory <tt>webapp</tt> of the configuration area of bundle <tt>org.eclipse.smila.http.server.test</tt>. The web application must not be assembled into a WAR file. The descriptor file must be located at <tt>WEB-INF/web.xml</tt> and the configuration directory for the named bundle must also provide a file named <tt>webdefault.xml</tt> containing default values for the <tt>web.xml</tt>. An <tt>override-web.xml</tt> is not supported. See <tt>configuration/org.eclipse.smila.http.server.test/</tt> for an exemplary simple setup.
</p>
<!--
NewPP limit report
Preprocessor node count: 154/1000000
Post-expand include size: 0/2097152 bytes
Template argument size: 0/2097152 bytes
#ifexist count: 0/100
-->
<!-- Saved in parser cache with key wikidb:pcache:idhash:30164-0!1!0!!en!2!edit=0 and timestamp 20120203101225 -->
<div class="printfooter">
Retrieved from "<a href="JettyHttpServer.html">http://wiki.eclipse.org/SMILA/Documentation/JettyHttpServer</a>"</div>
<!-- end content -->
<div class="visualClear"></div>
</div>
</div>
</div>
<!-- Yoink of toolbox for phoenix moved up -->
</div>
</div>
<div id="clearFooter"/>
<div id="footer" >
<ul id="footernav">
<li class="first"><a href="http://www.eclipse.org/">Home</a></li>
<li><a href="http://www.eclipse.org/legal/privacy.php">Privacy Policy</a></li>
<li><a href="http://www.eclipse.org/legal/termsofuse.php">Terms of Use</a></li>
<li><a href="http://www.eclipse.org/legal/copyright.php">Copyright Agent</a></li>
<li><a href="http://www.eclipse.org/org/foundation/contact.php">Contact</a></li>
<li><a href="http://wiki.eclipse.org/Eclipsepedia:About" title="Eclipsepedia:About">About Eclipsepedia</a></li>
</ul>
<span id="copyright">Copyright &copy; 2012 The Eclipse Foundation. All Rights Reserved</span>
<p id="footercredit">This page was last modified 08:28, 24 January 2012 by <a href="http://wiki.eclipse.org/index.php?title=User:Juergen.schumacher.attensity.com&amp;action=edit" class="new" title="User:Juergen.schumacher.attensity.com">Juergen Schumacher</a>. Based on work by <a href="http://wiki.eclipse.org/User:Andreas.schank.attensity.com" title="User:Andreas.schank.attensity.com">A. Schank</a>, <a href="http://wiki.eclipse.org/User:Tmenzel.brox.de" title="User:Tmenzel.brox.de">thomas menzel</a> and <a href="http://wiki.eclipse.org/index.php?title=User:Nadine.auslaender.attensity.com&amp;action=edit" class="new" title="User:Nadine.auslaender.attensity.com"> </a>.</p>
<p id="footerviews">This page has been accessed 1,627 times.</p>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-910670-4");
pageTracker._trackPageview();
</script>
<!-- <div class="visualClear"></div> -->
<script type="text/javascript">if (window.runOnloadHook) runOnloadHook();</script>
</div>
<!-- Served in 0.510 secs. --></body></html>