<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>A Public Scratchpad &#187; Jetty</title>
	<atom:link href="http://daniel.gredler.net/category/jetty/feed/" rel="self" type="application/rss+xml" />
	<link>http://daniel.gredler.net</link>
	<description></description>
	<lastBuildDate>Tue, 24 Jan 2012 01:02:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='daniel.gredler.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>A Public Scratchpad &#187; Jetty</title>
		<link>http://daniel.gredler.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://daniel.gredler.net/osd.xml" title="A Public Scratchpad" />
	<atom:link rel='hub' href='http://daniel.gredler.net/?pushpress=hub'/>
		<item>
		<title>Embedding Jetty 6 in Spring</title>
		<link>http://daniel.gredler.net/2007/12/31/embedding-jetty-6-in-spring/</link>
		<comments>http://daniel.gredler.net/2007/12/31/embedding-jetty-6-in-spring/#comments</comments>
		<pubDate>Mon, 31 Dec 2007 20:34:58 +0000</pubDate>
		<dc:creator>Daniel Gredler</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Jetty]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://daniel.gredler.net/2007/12/31/embedding-jetty-6-in-spring/</guid>
		<description><![CDATA[There&#8217;s not much info out there on embedding a Jetty server in Spring, and much of what does exist is for Jetty 5 (not Jetty 6) or uses helper classes that nobody wants to write. However, there is a decent example hidden in the Jetty Subversion repository (which requires an exploded WAR directory structure), and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daniel.gredler.net&amp;blog=887150&amp;post=54&amp;subd=gredler&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s not much info out there on embedding a <a href="http://jetty.mortbay.org/">Jetty</a> server in <a href="http://www.springframework.org/">Spring</a>, and much of <a href="http://www.stehno.com/articles/java/embedjettyinspring.php">what does exist</a> is for Jetty 5 (not Jetty 6) or uses helper classes that nobody wants to write. However, there is a <a href="http://svn.codehaus.org/jetty/jetty/trunk/extras/spring/etc/jetty-spring.xml">decent example</a> hidden in the Jetty Subversion repository (which requires an exploded WAR directory structure), and the <a href="http://docs.codehaus.org/display/JETTY/Embedding+Jetty">Jetty documentation</a> is pretty nice. The <a href="http://www.mortbay.org/apidocs/index.html">API docs</a> are useful, as well.</p>
<p>I had two goals: embed Jetty 6 (not 5), and do so without having to rearrange my directories into an exploded WAR structure. After a bit of tinkering, <a href="http://gredler.files.wordpress.com/2007/12/application-context-jetty.txt">this is the file</a> I ended up with. It contains 5 servlets and their mappings, just so that you can get a feel for the file, but you can certainly use it with any number of servlets.</p>
<p>Note that I had to change the file extension from <i>.xml</i> to <i>.txt</i> in order to appease my blogging software&#8230; Note also that this setup does <b>not</b> require the exploded WAR directory structure. The parts you&#8217;ll probably want to customize are the <i>servlets</i> list, the <i>servletMappings</i> list, the <i>resourceBase</i> property, and possibly the <i>contextPath</i> property.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gredler.wordpress.com/54/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gredler.wordpress.com/54/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gredler.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gredler.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gredler.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gredler.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gredler.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gredler.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gredler.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gredler.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gredler.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gredler.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gredler.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gredler.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gredler.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gredler.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=daniel.gredler.net&amp;blog=887150&amp;post=54&amp;subd=gredler&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://daniel.gredler.net/2007/12/31/embedding-jetty-6-in-spring/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d71895d31422ff2da109a665d5f6d256?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gredler</media:title>
		</media:content>
	</item>
	</channel>
</rss>
