<?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/"
	>

<channel>
	<title>Christophe Hamerling [Archive] &#187; java</title>
	<atom:link href="http://planet.petalslink.com/home/chamerling/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://planet.petalslink.com/home/chamerling</link>
	<description>Things around SOA, Web Services, Open Source and more...</description>
	<lastBuildDate>Wed, 07 Oct 2009 13:16:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Simple &amp; Useful : Remote debugging with Ant</title>
		<link>http://planet.petalslink.com/home/chamerling/2009/03/25/simple-useful-remote-debugging-with-ant/</link>
		<comments>http://planet.petalslink.com/home/chamerling/2009/03/25/simple-useful-remote-debugging-with-ant/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 15:13:27 +0000</pubDate>
		<dc:creator>Christophe Hamerling</dc:creator>
				<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://blog.ebmwebsourcing.com/home/chamerling/?p=74</guid>
		<description><![CDATA[A Ant java call like : &#60;target name=&#160;&#187;run&#160;&#187;&#62; &#60;java classname=&#160;&#187;foo.bar.App&#160;&#187; fork=&#160;&#187;false&#160;&#187;&#62; &#60;classpath refid=&#160;&#187;app.classpath&#160;&#187; /&#62; &#60;/java&#62; &#60;/target&#62; becomes : &#60;target name=&#160;&#187;run&#160;&#187;&#62; &#60;java classname=&#160;&#187;foo.bar.App&#160;&#187; fork=&#160;&#187;yes&#171;&#160;&#62; &#60;classpath refid=&#160;&#187;app.classpath&#160;&#187; /&#62; &#60;sysproperty key=&#160;&#187;DEBUG&#160;&#187; value=&#160;&#187;true&#160;&#187; /&#62; &#60;jvmarg value=&#160;&#187;-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000&#8243; /&#62; &#60;/java&#62; &#60;/target&#62; and is ready to be launch and &#8216;remote debugged&#8217; from a tool like Eclipse IDE.]]></description>
			<content:encoded><![CDATA[<p>A Ant java call like :</p>
<p><em>&lt;target name=&nbsp;&raquo;run&nbsp;&raquo;&gt;<br />
  &lt;java classname=&nbsp;&raquo;foo.bar.App&nbsp;&raquo; fork=&nbsp;&raquo;false&nbsp;&raquo;&gt;<br />
    &lt;classpath refid=&nbsp;&raquo;app.classpath&nbsp;&raquo; /&gt;<br />
  &lt;/java&gt;<br />
&lt;/target&gt;</em></p>
<p>becomes :</p>
<p><em>&lt;target name=&nbsp;&raquo;run&nbsp;&raquo;&gt;<br />
  &lt;java classname=&nbsp;&raquo;foo.bar.App&nbsp;&raquo; fork=&nbsp;&raquo;<strong>yes</strong>&laquo;&nbsp;&gt;<br />
    &lt;classpath refid=&nbsp;&raquo;app.classpath&nbsp;&raquo; /&gt;<br />
 <strong>   &lt;sysproperty key=&nbsp;&raquo;DEBUG&nbsp;&raquo; value=&nbsp;&raquo;true&nbsp;&raquo; /&gt;<br />
    &lt;jvmarg value=&nbsp;&raquo;-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000&#8243; /&gt;</strong><br />
  &lt;/java&gt;<br />
&lt;/target&gt;</em></p>
<p>and is ready to be launch and &#8216;remote debugged&#8217; from a tool like Eclipse IDE.</p>
]]></content:encoded>
			<wfw:commentRss>http://planet.petalslink.com/home/chamerling/2009/03/25/simple-useful-remote-debugging-with-ant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Handling static resources with Jetty</title>
		<link>http://planet.petalslink.com/home/chamerling/2009/03/25/handling-static-resources-with-jetty/</link>
		<comments>http://planet.petalslink.com/home/chamerling/2009/03/25/handling-static-resources-with-jetty/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 10:45:23 +0000</pubDate>
		<dc:creator>Christophe Hamerling</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[jetty]]></category>

		<guid isPermaLink="false">http://blog.ebmwebsourcing.com/home/chamerling/?p=69</guid>
		<description><![CDATA[Here is a quick (and easy) tip on how to handle static resources with Jetty6 (this is really nice and quick to setup such things for a demo ;o)). Here is the code : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a quick (and easy) tip on how to handle static resources with Jetty6 (this is really nice and quick to setup such things for a demo ;o)). Here is the code :</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">foo.bar</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.mortbay.jetty.Server</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.mortbay.jetty.handler.ContextHandlerCollection</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.mortbay.jetty.nio.SelectChannelConnector</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.mortbay.jetty.servlet.Context</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #008000; font-style: italic; font-weight: bold;">/**
 * @author Christophe HAMERLING - eBM WebSourcing
 *
 */</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> JettyServer <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">Exception</span> <span style="color: #009900;">&#123;</span>
        Server server <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Server<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">final</span> ContextHandlerCollection contexts <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ContextHandlerCollection<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #003399;">Context</span> context <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Context</span><span style="color: #009900;">&#40;</span>contexts, <span style="color: #0000ff;">&quot;/&quot;</span>, <span style="color: #003399;">Context</span>.<span style="color: #006633;">SESSIONS</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        context.<span style="color: #006633;">setResourceBase</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">System</span>.<span style="color: #006633;">getProperty</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;user.home&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        context.<span style="color: #006633;">addServlet</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;org.mortbay.jetty.servlet.DefaultServlet&quot;</span>, <span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">final</span> SelectChannelConnector nioConnector <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SelectChannelConnector<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        nioConnector.<span style="color: #006633;">setPort</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1978</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        server.<span style="color: #006633;">addConnector</span><span style="color: #009900;">&#40;</span>nioConnector<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        server.<span style="color: #006633;">setHandler</span><span style="color: #009900;">&#40;</span>contexts<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        server.<span style="color: #006633;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>This will display your home directory on <a href="http://localhost:1978">http://localhost:1978</a></p>
<p>Cheers</p>
]]></content:encoded>
			<wfw:commentRss>http://planet.petalslink.com/home/chamerling/2009/03/25/handling-static-resources-with-jetty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

