<?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>info.rmatics</title>
	<atom:link href="http://info.rmatics.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://info.rmatics.org</link>
	<description>Healthcare, Informatics, Software - in the real world.</description>
	<lastBuildDate>Thu, 04 Feb 2010 13:50:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Air Travel and Healthcare, Amended</title>
		<link>http://info.rmatics.org/2010/02/03/air-travel-and-healthcare-amended/</link>
		<comments>http://info.rmatics.org/2010/02/03/air-travel-and-healthcare-amended/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 14:22:46 +0000</pubDate>
		<dc:creator>William Crawford</dc:creator>
				<category><![CDATA[Health Policy]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://info.rmatics.org/?p=492</guid>
		<description><![CDATA[The video below, &#8220;If Air Travel Worked Like Health Care&#8221; has been making the rounds of the healthcare blogosphere. I spotted it first over at Running a Hospital, and it&#8217;s based on Jeffrey Rauch&#8217;s column from the National Journal.
But wait, there&#8217;s more! After seeing the video, a physician friend pointed out that it was missing [...]]]></description>
			<content:encoded><![CDATA[<p>The video below, &#8220;If Air Travel Worked Like Health Care&#8221; has been making the rounds of the healthcare blogosphere. I spotted it first over at <a href="http://runningahospital.blogspot.com/2010/01/my-goal-to-day-was-to-provide-you-with.html">Running a Hospital</a>, and it&#8217;s based on <a href="http://www.nationaljournal.com/njmagazine/st_20090926_4826.php">Jeffrey Rauch&#8217;s column</a> from the National Journal.</p>
<p>But wait, there&#8217;s more! After seeing the video, a physician friend pointed out that it was missing a critical point of disfunction. He then sent me this, which I begged him to allow me to post:</p>
<p><strong>Booking Agent</strong>: Hello, NationalAir. How can I help you?</p>
<p><strong>Customer</strong>: Yes, I&#8217;d like a flight from Boston to DC on February 3rd with Joseph Smith as the pilot.</p>
<p><strong>Booking Agent</strong>: I&#8217;m sorry. Pilot Joe Smith is completely booked for the next 6 months. How about Pilot Jane Wallace?</p>
<p><strong>Customer</strong>: I don&#8217;t know, my previous regional pilot recommended Pilot Joe Smith directly. Maybe you know my previous Pilot, Pilot Jeffery Jones?  He and Pilot Smith trained together in Denver.  Apparently, Pilot Smith is phenomenal on the Boston DC run. Be honest, is Jane Wallace a good pilot?</p>
<p><strong>Booking Agent</strong>: Yes, Jane is great!  She&#8217;s new to our airline, but she comes highly recommended. She graduated from the Air Force Academy with honors. She&#8217;s written several books on combat flight techniques and has studied passenger usage of air sick bags during high G evasive maneuvers induced by terrorist surface to air attacks.</p>
<p><strong>Customer</strong>: Okay&#8230;&#8230;great.  What is her track record on the Boston to DC flight?</p>
<p><strong>Booking Agent</strong>: I&#8217;m sorry, we don&#8217;t release that information.</p>
<p><strong>Customer</strong>: Okay, how about stats of NationalAir flying from Boston to DC?</p>
<p><strong>Booking Agent</strong>: We&#8217;re having discussions about that internally.  I will tell you that 6 out of 10 NationalAir frequent fliers choose NationalAir when flying on the East Coast on Tuesday between 8pm-12am in December (p<.001).  We also have great customer satisfaction for our inflight movie selection on transcontinental flights.  That work was actually recently published in the International Journal of Travel Pilots. We also have more Air Force Academy trained pilots than any other airline on the East Coast. We're very proud of that.</p>
<p><strong>Customer</strong>: Okay&#8230;.that&#8217;s helpful. NationalAir certainly has a great reputation&#8230;I&#8217;m sure Pilot  Wallace is more than capable of flying from Boston to DC. Book me for her please.</p>
<p><strong>Booking Agent</strong>: Great, you won&#8217;t be disappointed. She has an opening in late April&#8230;&#8230;</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/5J67xJKpB6c&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=en_US&#038;feature=player_embedded&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/5J67xJKpB6c&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=en_US&#038;feature=player_embedded&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://info.rmatics.org/2010/02/03/air-travel-and-healthcare-amended/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JSF Summit 2009 Review</title>
		<link>http://info.rmatics.org/2009/12/07/jsf-summit-2009-review/</link>
		<comments>http://info.rmatics.org/2009/12/07/jsf-summit-2009-review/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 02:40:07 +0000</pubDate>
		<dc:creator>Steven Boscarine</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://info.rmatics.org/?p=475</guid>
		<description><![CDATA[I was fortunate enough to attend the No Fluff Just Stuff JSF Summit this week in Orlando Florida.  I entered with an open mind and left with a long list of technologies to evaluate.  As expected, I left with a greater understanding of CDI and JSF 2.0.  The presenters were  friendly and accessible and made [...]]]></description>
			<content:encoded><![CDATA[<p>I was fortunate enough to attend the <a href="http://www.jsfsummit.com/conference/orlando/2009/12/home">No Fluff Just Stuff JSF Summit</a> this week in Orlando Florida.  I entered with an open mind and left with a long list of technologies to evaluate.  As expected, I left with a greater understanding of CDI and JSF 2.0.  The presenters were  friendly and accessible and made a great effort to reach out to new users.  I had an opportunity to speak to all the presenters individually at the many breaks and social events.  They all listened to my perspective as well as the perspectives of the other attendees and seemed to genuinely respect our input.  I came in knowing no one and left meeting many new friends.  Like all NFJS presentations, the catering and accommodations was first rate.</p>
<p>The presenters included influential Java celebrities and presentation circuit veterans like Ed Burns, David Geary, Andy Schwartz, Kito Mann, and Dan Allen.  Arguably more interesting were the presentations for technologies from presenters you may not have heard of yet.  Stan Silvert, Cagatay Civici, and Lincoln Baxter III surprised many of us with excellent presentations on JSFSpy, PrimeFaces, and PrettyFaces.  Many other presentations got rave reviews, but I wasn&#8217;t able to attend all of them The overall theme was JSF 2.0 as well as components of JEE6 and JSF 1.2 technologies.  No technical conference would be complete without good speeches.  Dan Allen&#8217;s JEE6 keynote was energetic and genuinely inspiring and Jay Balunas&#8217; closing speech on the virtues standardization was an enjoyable close to a wonderful conference.</p>
<p>For me, the technical highlights were CDI, JSF 2.0 standardized ajax, view parameters, view parameter templating and converters, composite components, and resource handling in JSF 2.  I&#8217;ll attempt to give the features the coverage they deserve in individual blog posts next year. The JEE6 release is more than exciting, it&#8217;s a game-changer.  The JCP has come up with the best JEE release yet and from what I&#8217;ve seen, they have a better stack than any competing technology on the market.  With modest promotion effort, they are likely to expand their marketshare beyond existing JSF users to new users from other frameworks and even win back a few frustrated Java users who defected to Ruby, PHP, and .NET.</p>
<p>I left the long conference both exhausted and full of hope for the future of the Java platform.</p>
<p>The specific sessions I attended were:</p>
<ul>
<li>JSF 2: Keeping Progress Coming by Dan Allen and Andy Schwartz</li>
<li>EZComp: Composite Components in JSF 2.0 by Ed Burns</li>
<li>Polyglot JavaServer Faces by Kito Mann</li>
<li>Maturing your application&#8217;s security with Seam Security by Dan Allen</li>
<li>CDI (JSR-299), Weld and the future of Seam by Dan Allen</li>
<li>Killer Web apps with JSF 2.0: Ajax by David Geary</li>
<li>Upgrading to JSF 2 by Kito Mann</li>
<li>The Portlet Bridge and the 2.0s by Michael Freedman</li>
<li>JSF Component Behaviors Deep Dive by Andy Schwartz</li>
<li>PrettyFaces &#8211; Harness SEO, Improve User Experience, Ease Development by Lincoln Baxter III</li>
<li>Dumping JSF by Stan Silvert</li>
</ul>
<p>Lincoln Baxter III deserves special mention for delivering the most entertaining session of the bunch.  He not only delivered a first rate presentation on his PrettyFaces project, but he <a title="rickrolled" href="http://en.wikipedia.org/wiki/Rickrolling">rickrolled</a> the audience and segued into a brief dance routine&#8230;all in the name of demonstrating the importance of RESTful URLs&#8230;something the Java community needs to take more seriously.</p>
<p>I left the conference very hopeful for the JEE platform and think 2010 will a great year for the Java platform.</p>
<h2>Further Reading</h2>
<ul>
<li>JSF 2.0 Community Homepage <a title="http://www.javaserverfaces.org/" href="http://www.javaserverfaces.org/">http://www.javaserverfaces.org/</a></li>
<li>JSFSpy:  <a title="http://www.jboss.org/community/wiki/JSFSpy" href="http://www.jboss.org/community/wiki/JSFSpy">http://www.jboss.org/community/wiki/JSFSpy</a></li>
<li>PrettyFaces RESTful URLs <a title="http://ocpsoft.com/prettyfaces/" href="http://ocpsoft.com/prettyfaces/">http://ocpsoft.com/prettyfaces/</a></li>
<li>PrimeFaces JSF Components <a title="http://primefaces.prime.com.tr/en/" href="http://primefaces.prime.com.tr/en/">http://primefaces.prime.com.tr/en/</a></li>
<li><a href="http://www.jboss.org/community/wiki/RichFaces40Planning">RichFaces 4.0</a></li>
<li><a href="http://www.jsfsummit.com/conference/orlando/2009/12/schedule">JSF Summit</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://info.rmatics.org/2009/12/07/jsf-summit-2009-review/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Changing Platform Rules</title>
		<link>http://info.rmatics.org/2009/10/28/challenges-for-social-media-applications/</link>
		<comments>http://info.rmatics.org/2009/10/28/challenges-for-social-media-applications/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 18:50:04 +0000</pubDate>
		<dc:creator>William Crawford</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[People Who Make Software]]></category>

		<guid isPermaLink="false">http://info.rmatics.org/?p=465</guid>
		<description><![CDATA[TechCrunch reports this morning that Facebook is changing the rules (again) for third party developers. They&#8217;ve done this a few times. So has Apple, on the iPhone platform &#8211; when they can be bothered to fully explain the rules in the first place.  Meanwhile, Motorola introduced Droid today &#8211; the new flagship Android 2.0 sliding [...]]]></description>
			<content:encoded><![CDATA[<p>TechCrunch reports this morning that <a href="http://www.techcrunch.com/2009/10/28/d-day-for-facebook-app-developers/">Facebook is changing the rules (again)</a> for third party developers. They&#8217;ve done this a few times. So has Apple, on the iPhone platform &#8211; when they can be bothered to fully explain the rules in the first place.  Meanwhile, Motorola introduced Droid today &#8211; the new flagship Android 2.0 sliding keyboard phone.  Unlike Facebook and Apple, Android is an open platform, without Google guarding the gates for developers. And developers are already complaining that the in-market mix of Android 1.5, 1.6 and 2.0 is driving development costs towards an unsustainable endpoint.</p>
<p>All of this has got me thinking about the challenges of building applications on other people&#8217;s platforms.  Whatever users may say about Windows, Microsoft has always treated its ISV partners pretty well.  Lots of notice, and no arbitrary barriers to deployment (Apple) or random, substantive policy and feature swings (Facebook).</p>
<p>I have no deep insight here, but I&#8217;m curious &#8211; particularly in our area of healthcare informatics and public health, how much is platform instability (and profusion!) limiting the development of next-generation applications?  What&#8217;s required to justify an investment in these platforms?</p>
<p>As for Android &#8211; depending on what the reviews look like, I&#8217;ll probably get a Droid next week or the week after, despite my Sprint contract.  I&#8217;ve been fully fed up with Windows Mobile for a while, don&#8217;t like Blackberrys, and need a sliding keyboard. Hope the application developers keep up&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://info.rmatics.org/2009/10/28/challenges-for-social-media-applications/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Side Adventures in JSF 2.0:  Deploy the Hello World example in Tomcat.</title>
		<link>http://info.rmatics.org/2009/10/24/jsf2_tutorial_0b/</link>
		<comments>http://info.rmatics.org/2009/10/24/jsf2_tutorial_0b/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 23:55:25 +0000</pubDate>
		<dc:creator>Steven Boscarine</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://info.rmatics.org/?p=451</guid>
		<description><![CDATA[In a previous post.  I showed how to do the absolute bare minimum to get a CDI/Weld project running in Jetty.  Jetty is my favorite container because when launched from maven, it automatically redeploys classes as you modify them without configuring my IDE.  
However, in every Java job I&#8217;ve ever held, the [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://info.rmatics.org/2009/10/17/jsf2_tutorial_0">a previous post</a>.  I showed how to do the absolute bare minimum to get a CDI/Weld project running in Jetty.  Jetty is my favorite container because when launched from maven, it automatically redeploys classes as you modify them without configuring my IDE.  </p>
<p>However, in every Java job I&#8217;ve ever held, the final product is deployed to another container, such as Tomcat.  Fortunately, the Tomcat web application is almost identical to Jetty.  Just take the identical application, add a context.xml and deploy.  </p>
<h1>Create context.xml</h1>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#from your project home directory (where pom.xml lives)</span>
<span style="color: #c20cb9; font-weight: bold;">touch</span> src<span style="color: #000000; font-weight: bold;">/</span>main<span style="color: #000000; font-weight: bold;">/</span>webapp<span style="color: #000000; font-weight: bold;">/</span>META-INF<span style="color: #000000; font-weight: bold;">/</span>context.xml</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Context<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Manager</span> <span style="color: #000066;">pathname</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span> <span style="color: #808080; font-style: italic;">&lt;!-- disables storage of sessions across restarts --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Resource</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;BeanManager&quot;</span> <span style="color: #000066;">auth</span>=<span style="color: #ff0000;">&quot;Container&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;javax.enterprise.inject.spi.BeanManager&quot;</span> </span>
<span style="color: #009900;">		<span style="color: #000066;">factory</span>=<span style="color: #ff0000;">&quot;org.jboss.weld.resources.ManagerObjectFactory&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #808080; font-style: italic;">&lt;!-- Uncomment to enable injection into Servlet --&gt;</span>
	<span style="color: #808080; font-style: italic;">&lt;!-- &lt;Listener className=&quot;org.jboss.weld.environment.tomcat.WeldLifecycleListener&quot;/&gt; --&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Context<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Now, build the project using the standard Maven way:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mvn clean package</pre></div></div>

<p>In your target directory, you&#8217;ll find a war you can deploy using tomcat manager.</p>
<h1>Automate Tomcat Deployments using Cargo</h1>
<p>If you&#8217;re like me, you hate doing things more than once when a script can do the job for you.  Simply add:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- Cargo - deploys to Tomcat using command 'mvn clean package cargo:redeploy'. --&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.codehaus.cargo<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>cargo-maven2-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;container<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;containerId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>tomcat6x<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/containerId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>remote<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/container<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>runtime<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #808080; font-style: italic;">&lt;!-- Declare a tomcat.user and tomcat.password in your settings file --&gt;</span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;cargo.remote.username<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${tomcat.username}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/cargo.remote.username<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;cargo.remote.password<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${tomcat.password}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/cargo.remote.password<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #808080; font-style: italic;">&lt;!--defaults to localhost:8080--&gt;</span>
				<span style="color: #808080; font-style: italic;">&lt;!--&lt;cargo.hostname&gt;localhost&lt;/cargo.hostname&gt;--&gt;</span>
				<span style="color: #808080; font-style: italic;">&lt;!--&lt;cargo.servlet.port&gt;8080&lt;/cargo.servlet.port&gt;--&gt;</span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>If you have a settings.xml file in your .m2 directory, then add the tomcat.username and tomcat.password variables.  If you don&#8217;t have one, create a file named settings.xml in ~/.m2/</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">touch</span> ~<span style="color: #000000; font-weight: bold;">/</span>.m2<span style="color: #000000; font-weight: bold;">/</span>settings.xml</pre></div></div>

<p>If you have not yet declared a settings.xml, use the one below to get started and add your manager username and password.  </p>
<h2>settings.xml</h2>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;settings</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/SETTINGS/1.0.0&quot;</span> <span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span>
<span style="color: #009900;">	<span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;profiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;profile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>default<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;tomcat.username<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>(a valid tomcat user in 'manager' role)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tomcat.username<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;tomcat.password<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>(the manager password)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tomcat.password<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/profile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/profiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;activeProfiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;activeProfile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>default<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/activeProfile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/activeProfiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/settings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h2>Ready to deploy</h2>
<p>Now you can deploy to localhost:8080 using the command below.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mvn clean package cargo:redeploy</pre></div></div>

<p>The host and port can be configured by setting cargo.hostname and cargo.servlet.port.  </p>
<h1>All Done</h1>
<p>Now you can deploy your application to tomcat automatically.  </p>
<h1>Further Reading</h1>
<ul>
<li><a href="http://cargo.codehaus.org/Maven2+plugin">Information about configuring Cargo.</a></li>
<li><a href="http://maven.apache.org/settings.html">Informating about how to configure your settings.xml file.</a>  </li>
<li><a href="http://info.rmatics.org/2009/10/17/jsf2_tutorial_0"> My JSF2 + Weld Hello World tutorial.</a></li>
<li><a href="http://www.seamframework.org/Documentation/SeamDocumentation#H-WeldReferenceDocumentation"> Weld Reference Documentation and JSR 299 Specification.</a></li>
<li><a href="http://jcp.org/en/jsr/detail?id=314">JSF 2.0 Specification, JSR 314.</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://info.rmatics.org/2009/10/24/jsf2_tutorial_0b/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adventures in JSF 2.0:  Hello World Tutorial using Maven 2, JSF 2, Facelets 2, and Weld</title>
		<link>http://info.rmatics.org/2009/10/17/jsf2_tutorial_0/</link>
		<comments>http://info.rmatics.org/2009/10/17/jsf2_tutorial_0/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 20:59:27 +0000</pubDate>
		<dc:creator>Steven Boscarine</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[People Who Make Software]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Facelets]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JEE6]]></category>
		<category><![CDATA[JSF2]]></category>
		<category><![CDATA[Maven2]]></category>
		<category><![CDATA[Weld]]></category>

		<guid isPermaLink="false">http://info.rmatics.org/?p=390</guid>
		<description><![CDATA[In the first of many posts regarding the recently finalized JSF 2.0, I will be showing you what you need to do to write a simple Hello World Application.  Instead of traditional JSF backing beans, this application will use Weld, an open-source implementation of JSR-299: Contexts and Dependency Injection for the Java EE platform. [...]]]></description>
			<content:encoded><![CDATA[<p>In the first of many posts regarding the recently finalized JSF 2.0, I will be showing you what you need to do to write a simple Hello World Application.  Instead of traditional JSF backing beans, this application will use Weld, an open-source implementation of JSR-299: Contexts and Dependency Injection for the Java EE platform.  JSR-299 will be part of the upcoming JEE 6 specification.  </p>
<h1>Prerequisites:</h1>
<p>Install Sun&#8217;s JDK 6, the latest version of Maven (presently 2.2.1), and the IDE of your choice.  I use Eclipse, but GEdit or notepad would work just fine.  For this demo, I&#8217;ll be using Jetty, so you won&#8217;t need to install a container of any sort.  </p>
<h1>Getting Started:</h1>
<h2>Create Empty Project</h2>
<p>Our first step is to create an ordinary empty WAR project in Maven using the
<pre>archetype:generate</pre>
<p> command in the directory of your choice.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>workspace <span style="color: #666666; font-style: italic;">#this can obviously be anywhere.</span>
mvn archetype:generate <span style="color: #660033;">-DinteractiveMode</span>=n <span style="color: #660033;">-DarchetypeArtifactId</span>=maven-archetype-webapp <span style="color: #660033;">-Dversion</span>=0.0.1-SNAPSHOT <span style="color: #660033;">-DgroupId</span>=org.bogus <span style="color: #660033;">-DartifactId</span>=jsf2_tutorial</pre></div></div>

<p>Unfortunately, the default Maven archetype falls short of what we need, so we need to make a few extra directories.  We need a java directory and the test java and resources directory.  I&#8217;ve also added the commands that an eclipse user would use to generate an importable eclipse project.  Netbeans and IntellJ users can simply import the pom.xml.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#create a few extra directories for the project.</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> jsf2_tutorial<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span> jsf2_tutorial<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span><span style="color: #000000; font-weight: bold;">/</span>java jsf2_tutorial<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span><span style="color: #000000; font-weight: bold;">/</span>resources jsf2_tutorial<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>main<span style="color: #000000; font-weight: bold;">/</span>java
<span style="color: #7a0874; font-weight: bold;">cd</span> jsf2_tutorial
<span style="color: #666666; font-style: italic;">#if you're using *NIX, you can create empty files with this command.</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> src<span style="color: #000000; font-weight: bold;">/</span>main<span style="color: #000000; font-weight: bold;">/</span>java<span style="color: #000000; font-weight: bold;">/</span>org<span style="color: #000000; font-weight: bold;">/</span> src<span style="color: #000000; font-weight: bold;">/</span>main<span style="color: #000000; font-weight: bold;">/</span>java<span style="color: #000000; font-weight: bold;">/</span>org<span style="color: #000000; font-weight: bold;">/</span>bogus<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #666666; font-style: italic;">#need to create package first.</span>
<span style="color: #c20cb9; font-weight: bold;">touch</span> pom.xml src<span style="color: #000000; font-weight: bold;">/</span>main<span style="color: #000000; font-weight: bold;">/</span>webapp<span style="color: #000000; font-weight: bold;">/</span>WEB-INF<span style="color: #000000; font-weight: bold;">/</span>web.xml src<span style="color: #000000; font-weight: bold;">/</span>main<span style="color: #000000; font-weight: bold;">/</span>webapp<span style="color: #000000; font-weight: bold;">/</span>WEB-INF<span style="color: #000000; font-weight: bold;">/</span>beans.xml src<span style="color: #000000; font-weight: bold;">/</span>main<span style="color: #000000; font-weight: bold;">/</span>java<span style="color: #000000; font-weight: bold;">/</span>org<span style="color: #000000; font-weight: bold;">/</span>bogus<span style="color: #000000; font-weight: bold;">/</span>HelloWorld.java src<span style="color: #000000; font-weight: bold;">/</span>main<span style="color: #000000; font-weight: bold;">/</span>webapp<span style="color: #000000; font-weight: bold;">/</span>index.xhtml src<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span><span style="color: #000000; font-weight: bold;">/</span>resources<span style="color: #000000; font-weight: bold;">/</span>jetty-env.xml</pre></div></div>

<h1>Overview</h1>
<p>I was very impressed that a simple Hello World project can be created with as little as five artifacts.</p>
<ol>
<li>/pom.xml</li>
<li>/src/main/webapp/WEB-INF/web.xml</li>
<li>/src/main/webapp/WEB-INF/beans.xml</li>
<li>/src/main/java/org/bogus/HelloWorld.java</li>
<li>/src/main/webapp/index.xhtml</li>
<li>/src/test/resources/jetty-env.xml (for Jetty users).</li>
</ol>
<h1>Writing the actual Code</h1>
<h2>pom.xml</h2>
<p>The first step is to the pom.xml file.  Afterwards it can be easily imported into any modern IDE.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/POM/4.0.0&quot;</span> <span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span>
<span style="color: #009900;">	<span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;modelVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>4.0.0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/modelVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.bogus<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>helloworld<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;packaging<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>war<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/packaging<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0.0.1-SNAPSHOT<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>JSF 2.0 Tutorial<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;repositories<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #808080; font-style: italic;">&lt;!-- As of October 2009, a few of the weld dependencies were not yet on the main maven repo.  We can add JBoss repo as it is updated more frequently.  --&gt;</span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;repository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>repository.jboss.org<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>JBoss Repository<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://repository.jboss.org/maven2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;releases<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/releases<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;snapshots<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/snapshots<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/repository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/repositories<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #808080; font-style: italic;">&lt;!-- Common --&gt;</span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javax.enterprise<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>cdi-api<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>provided<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.0-CR1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javax.annotation<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>jsr250-api<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javax.faces<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>jsf-api<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2.0.0-RC<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
		<span style="color: #808080; font-style: italic;">&lt;!-- Jetty-specific scopes and artifacts --&gt;</span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javax.faces<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>jsf-impl<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>runtime<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2.0.0-RC<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javax.servlet<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>jstl<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>runtime<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.jboss.weld.servlet<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>weld-servlet<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.0.0-CR1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>runtime<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.glassfish.web<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>el-impl<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2.1.2-b04<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>runtime<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;exclusions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;exclusion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javax.el<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>el-api<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/exclusion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/exclusions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;finalName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>jsf2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/finalName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #808080; font-style: italic;">&lt;!-- Compiler plugin enforces Java 1.6 --&gt;</span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-compiler-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;source<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.6<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/source<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.6<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
			<span style="color: #808080; font-style: italic;">&lt;!-- Eclipse plugin enforces download of source and JavaDoc jars --&gt;</span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-eclipse-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;wtpversion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2.0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/wtpversion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;downloadSources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/downloadSources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;downloadJavadocs<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/downloadJavadocs<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #808080; font-style: italic;">&lt;!-- Embedded Jetty (jetty:run) --&gt;</span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.mortbay.jetty<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-jetty-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #808080; font-style: italic;">&lt;!-- force friendly name instead of artifact name + version --&gt;</span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;contextPath<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${build.finalName}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/contextPath<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #808080; font-style: italic;">&lt;!-- Where the BeanManager is constructed.  This is where we'll later declare datasource. --&gt;</span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;jettyEnvXml<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${basedir}/src/test/resources/jetty-env.xml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/jettyEnvXml<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #808080; font-style: italic;">&lt;!-- This parameter will auto-deploy modified classes...my personal favorite Jetty feature. --&gt;</span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;scanIntervalSeconds<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/scanIntervalSeconds<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Now that your pom is complete, you can import it into the IDE of your choice.  Eclipse requires users to either install m2eclipse or run:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mvn eclipse:eclipse</pre></div></div>

<h1>Boilerplate</h1>
<h2>web.xml</h2>
<p>Since JSF 1.2, the web.xml page got a lot smaller.  This is where convention over configuration pays off.  Also, faces-config.xml is now optional!</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;web-app</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://java.sun.com/xml/ns/javaee&quot;</span> <span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span>
<span style="color: #009900;">	<span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot;</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;2.5&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #808080; font-style: italic;">&lt;!-- Standard JSF 2.0 Configuration Paramters. --&gt;</span>
	<span style="color: #808080; font-style: italic;">&lt;!-- No Joke!!...This is all you need now! --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;context-param<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javax.faces.DEFAULT_SUFFIX<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/param-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param-value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>.xhtml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/param-value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/context-param<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;servlet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;servlet-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Faces Servlet<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/servlet-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;servlet-class<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javax.faces.webapp.FacesServlet<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/servlet-class<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;load-on-startup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/load-on-startup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/servlet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;servlet-mapping<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;servlet-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Faces Servlet<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/servlet-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;url-pattern<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>*.jsf<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/url-pattern<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/servlet-mapping<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
	<span style="color: #808080; font-style: italic;">&lt;!-- Weld Jetty Configuration parameters --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;listener<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;listener-class<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.jboss.weld.environment.servlet.Listener<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/listener-class<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/listener<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;resource-env-ref<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Object factory for the CDI Bean Manager<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;resource-env-ref-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>BeanManager<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/resource-env-ref-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;resource-env-ref-type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javax.enterprise.inject.spi.BeanManager<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/resource-env-ref-type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/resource-env-ref<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/web-app<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h2>beans.xml</h2>
<p>In order to indicate to weld to initialize dependency injection, you&#8217;ll need to create an empty file named beans.xml.  The mere presence of this file in your WEB-INF folder tells the container that your WEB-INF/classes folder is a <em>bean deployment archive</em>.</p>
<h1>Application-Specific Code</h1>
<h2>HelloWorld.java</h2>
<p>To confirm that Weld (A.K.A. JSR 299 or WebBeans) Dependency Injection works, we&#8217;re going to write an incredibly simple bean.  In contrast to Spring, you don&#8217;t need to declare the package or bean.  Simply adding the @Named annotations and declaring a scope is all that is needed to have your bean registered with the dependency injection container and visible to your facelets view pages.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">org.bogus</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.Serializable</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javax.enterprise.context.SessionScoped</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javax.inject.Named</span><span style="color: #339933;">;</span>
&nbsp;
@Named <span style="color: #666666; font-style: italic;">//assigns this bean the name of &quot;helloWorld&quot;...its &quot;de-caplitalized&quot; class name</span>
@SessionScoped  <span style="color: #666666; font-style: italic;">//creates one bean for each user session.</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> HelloWorld <span style="color: #000000; font-weight: bold;">implements</span> <span style="color: #003399;">Serializable</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #003399;">String</span> text <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Hello World!&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> getText<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> text<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">long</span> serialVersionUID <span style="color: #339933;">=</span> 1L<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h2>index.xhtml</h2>
<p>Now we want to actually view the bean we created.  Below is an incredibly simple xhtml/facelets page.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;DTD/xhtml1-strict.dtd&quot;&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;html</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span> <span style="color: #000066;">xmlns:h</span>=<span style="color: #ff0000;">&quot;http://java.sun.com/jsf/html&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;h:head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>JSF Demo<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h:head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;h:body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;h1<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Does Weld Work?<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h1<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #808080; font-style: italic;">&lt;!-- Your bean can be easily accessed via Expression Language --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>My weld-injected bean says: #{helloWorld.text}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h:body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h2>jetty-env.xml</h2>
<p>Since we&#8217;re not using a full JEE container, we need to configure Jetty to prepare the BeanManager.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #00bbdd;">&lt;!DOCTYPE Configure PUBLIC &quot;-//Mort Bay Consulting//DTD Configure//EN&quot;</span>
<span style="color: #00bbdd;">   &quot;http://jetty.mortbay.org/configure.dtd&quot;&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Configure</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;webAppCtx&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;org.mortbay.jetty.webapp.WebAppContext&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;New</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;appManager&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;org.mortbay.jetty.plus.naming.Resource&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Arg<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Ref</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;webAppCtx&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Arg<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Arg<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>BeanManager<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Arg<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Arg<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;New</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;javax.naming.Reference&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Arg<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javax.enterprise.inject.spi.BeanManager<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Arg<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Arg<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.jboss.weld.resources.ManagerObjectFactory<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Arg<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Arg</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/New<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Arg<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/New<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Configure<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h1>Start up Jetty</h1>
<p>Jetty is an embedded servlet container that can be easily launched from Maven.  Since we added that small snippet to the pom, we can simply type:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mvn war:inplace jetty:run</pre></div></div>

<p> &#8230;and maven will download Jetty and run it with the configuration file we passed.</p>
<h1>Test Your Application</h1>
<p>Simply load http://localhost:8080/jsf/index.jsf</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">firefox http:<span style="color: #000000; font-weight: bold;">//</span>localhost:<span style="color: #000000;">8080</span><span style="color: #000000; font-weight: bold;">/</span>jsf<span style="color: #000000; font-weight: bold;">/</span>index.jsf</pre></div></div>

<p><img src="http://info.rmatics.org/wp-content/uploads/2009/10/Screenshot-JSF-Demo-Mozilla-Firefox.gif" alt="Screenshot of your application" title="Screenshot of your application" width="685" height="277" class="alignnone size-full wp-image-421" /><br />
If you see the hello world text, everything has worked.  Now that you&#8217;ve confirmed your configuration is setup correctly, you can explore the more interesting features of Weld and JSF 2, which I&#8217;ll be covering in future posts.</p>
<h1>Download the Code</h1>
<p>The source code to this tutorial is available via subversion <a href="http://crotchetycoder.googlecode.com/svn/trunk/tutorials/jsf2/0_helloworld">here</a></p>
<h1>UPDATE:  Tomcat Users</h1>
<p>With the addition of a context.xml, this example runs perfectly on Tomcat.<br />
<a href="http://info.rmatics.org/2009/10/24/jsf2_tutorial_0b/">Please see this article for details</a>.  </p>
<h1>Further Reading</h1>
<ul>
<li><a href="http://www.seamframework.org/Documentation/SeamDocumentation#H-WeldReferenceDocumentation">Weld Reference Documentation and JSR 299 Specification.</a></li>
<li><a href="http://jcp.org/en/jsr/detail?id=314">JSF 2.0 Specification, JSR 314</a></li>
</ul>
<p>Many thanks to the JBoss staff on the forums who helped me get started in Weld.  The artifacts in this article were modeled after their examples.  </p>
]]></content:encoded>
			<wfw:commentRss>http://info.rmatics.org/2009/10/17/jsf2_tutorial_0/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Duct Tape Programming:  Macho?&#8230;Yes!  Practical?&#8230;Rarely!</title>
		<link>http://info.rmatics.org/2009/10/06/duct-tape-programming-macho-yes-practical-rarely/</link>
		<comments>http://info.rmatics.org/2009/10/06/duct-tape-programming-macho-yes-practical-rarely/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 18:01:02 +0000</pubDate>
		<dc:creator>Steven Boscarine</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[People Who Make Software]]></category>

		<guid isPermaLink="false">http://info.rmatics.org/?p=377</guid>
		<description><![CDATA[In  http://www.joelonsoftware.com/items/2009/09/23.html, Joel Spolsky of the Joel on Software Blog advocates a practice he calls &#8220;Duct Tape Programming.&#8221;  What he advocates actually is nothing new.  It&#8217;s more commonly known as &#8220;Cowboy Coding.&#8221;   I decided to post my response for public comment.
Joel&#8217;s article was amusing, but obviously balance is important.
I got [...]]]></description>
			<content:encoded><![CDATA[<p>In  <a href="http://www.joelonsoftware.com/items/2009/09/23.html ">http://www.joelonsoftware.com/items/2009/09/23.html</a>, Joel Spolsky of the Joel on Software Blog advocates a practice he calls &#8220;Duct Tape Programming.&#8221;  What he advocates actually is nothing new.  It&#8217;s more commonly known as &#8220;Cowboy Coding.&#8221;   I decided to post my response for public comment.</p>
<p>Joel&#8217;s article was amusing, but obviously balance is important.</p>
<p>I got the impression the Joel was rebelling against COM, C++, OOP, and general abstraction.  I can&#8217;t say I personally share his view that complex technology is inherently bad.  These features are sharp tools, much like the power tools today&#8217;s carpenter uses to build a house.  Left in the hands of idiots, sharp tools cause problems.  It doesn&#8217;t take too much imagination to see how assigning an idiot with a drinking problem and an addiction to cough syrup with the task of ripping boards (cutting lengthwise)  with a table saw can cause problems. Likewise, letting someone write multi-threaded code who doesn&#8217;t have the skill necessary to handle it responsibly is a recipe for disaster.</p>
<p>Over-engineering is a serious threat to a business, especially since many engineers I have worked with can fairly be accused of over-engineering at some point or another in his or her career.  However, there&#8217;s obviously a reason things like Object Oriented Programming exist&#8230; and it isn&#8217;t just because the entire software engineering profession isn&#8217;t as smart as Mr. Macho Duct Tape Cowboy.</p>
<p>Everyone reading this who has written code for a large company has seen what happens when duct tape programming gets taken too far.  You end up with a giant legacy system, written by two-dozen authors over multiple decades. The application performs poorly, is difficult to maintain, and no one has holistic knowledge of how the system works.  You often find yourself spending 6 months training each engineer which touches the system on your internal proprietary duct tape patterns.   Duct tape programming is fine and dandy until you ship something that&#8217;s broken or can&#8217;t be extended to fit your changing business needs &#8212; because it is a giant scary monolith and every simple change in one piece of functionality breaks another piece that was duct-taped on it 5 years ago.</p>
<p>OOP and standardization technologies that abstract complexity pay off when you have more developers that can fit comfortably in a small office and you realistically expect for a product to be handled in the future by people other than its original authors.  They add complexity for the sake of compartmentalizing functionality so it can be distributed among different authors and can encourage documentation of the workings of each module.</p>
<p>My team pushes for modern standards and best practices so that we can hire a sharp developer who&#8217;s familiar with modern technology, and he can instantly understand most of what we&#8217;re doing.  More often than not, we could have shipped whatever we were working on slightly faster if we ignored standardization and just did things the way we did them many years ago because it was familiar to us.  However, the customer would pay the price when they asked someone other than us to maintain our quickly-shipped, duct-taped masterpiece.</p>
<p>Most professional developers write code for a company for the sake of delivering a quality application, a tool to enhance their business.  You do the client no favor by saving them money on the initial delivery and costing them more down the road to keep the product running and relevant&#8230; unless you&#8217;re solely billing by the hour and are in a situation where they can never fire or sue you.</p>
<p>Clearly this is a complex problem that people are years from solving, but until the geniuses of the world get together and solve this once and for all, I personally think we&#8217;re best off balancing writing elegant, standards-compliant code with shipping things on time and not blindly adopting technology without fully understanding the consequences.</p>
]]></content:encoded>
			<wfw:commentRss>http://info.rmatics.org/2009/10/06/duct-tape-programming-macho-yes-practical-rarely/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Grant Central in HMS Focus</title>
		<link>http://info.rmatics.org/2009/10/05/grant-central-in-hms-focus/</link>
		<comments>http://info.rmatics.org/2009/10/05/grant-central-in-hms-focus/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 23:22:18 +0000</pubDate>
		<dc:creator>William Crawford</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://info.rmatics.org/?p=375</guid>
		<description><![CDATA[A little horn-tooting this evening: our Grant Central application was the subject of a lengthy article in Harvard Medical School&#8217;s Focus magazine. They talk about the application, but also the software design and research process.
]]></description>
			<content:encoded><![CDATA[<p>A little horn-tooting this evening: our<a href="http://grants.catalyst.harvard.edu"> Grant Central </a>application was the subject of a lengthy article in Harvard Medical School&#8217;s Focus magazine. <a href="http://focus.hms.harvard.edu/2009/100209/grant_writing_tool.shtml">They talk about the application, but also the software design and research process</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://info.rmatics.org/2009/10/05/grant-central-in-hms-focus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Best Care</title>
		<link>http://info.rmatics.org/2009/09/30/the-best-care/</link>
		<comments>http://info.rmatics.org/2009/09/30/the-best-care/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 18:35:40 +0000</pubDate>
		<dc:creator>William Crawford</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[healthcare reform]]></category>

		<guid isPermaLink="false">http://info.rmatics.org/2009/09/30/the-best-care/</guid>
		<description><![CDATA[I&#8217;m at a conference at Harvard Medical School today, with various industry and policy luminaries. Federal CTO Aneesh Chopra and HHS CTO Todd Park were just speaking. Reginza Herzlinger is giving a talk right now. Clayton Christensen was here this morning. Gotta love Harvard, and I&#8217;ve got a number of thoughts which I&#8217;ll wrap into [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m at a conference at Harvard Medical School today, with various industry and policy luminaries. Federal CTO Aneesh Chopra and HHS CTO Todd Park were just speaking. Reginza Herzlinger is giving a talk right now. Clayton Christensen was here this morning. Gotta love Harvard, and I&#8217;ve got a number of thoughts which I&#8217;ll wrap into a set of posts over the next few days.</p>
<p>But until then, I wanted to draw out a single point that has recurred a lot in various conversations I&#8217;ve had over the last few days. Christensen brought it up again in his keynote this morning. It&#8217;s this: the best care for complex disease is delivered by groups of physicians who are coordinated with each other. That coordination comes from being in the same room.</p>
<p>Dr. Christensen&#8217;s example (from his book) is an acquaintance spent years looking for appropriate treatment for his asthma. Over several years he saw many different specialists, and they didn&#8217;t solve the problem. Then he saw the same set of specialists (different people, same expertise), all in the same room, after flying to Denver. And they figured it out in 30 minutes. </p>
<p>I saw something similar this winter after visiting a microvascular disease clinic at Massachusetts General Hospital. It was a volunteer effort, run on a Saturday morning, with 6 or 7 experience specialists and a few residents and fellows. They saw patient after patient, all of whom had been bouncing through the system &#8211; and more or less without exception, they knocked each problem down as fast as it came up. </p>
<p>So here&#8217;s a question for healthcare reformers and healthcare technology innovators. How can we create that same quality of care for everyone who has a difficult to diagnose condition?</p>
]]></content:encoded>
			<wfw:commentRss>http://info.rmatics.org/2009/09/30/the-best-care/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Final Word on Breach Notification</title>
		<link>http://info.rmatics.org/2009/09/22/a-final-word-on-breach-notification/</link>
		<comments>http://info.rmatics.org/2009/09/22/a-final-word-on-breach-notification/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 13:49:54 +0000</pubDate>
		<dc:creator>William Crawford</dc:creator>
				<category><![CDATA[Clinical Informatics]]></category>
		<category><![CDATA[Health Policy]]></category>

		<guid isPermaLink="false">http://info.rmatics.org/?p=372</guid>
		<description><![CDATA[The new data breach notification rules for covered entities and PCHR Platform providers go into effect on September 23 (for covered entities) and September 24 (PCHR Platforms and providers). There&#8217;s a nice wrap-up here.
One big change from the prior environment is that the business associates of a HIPAA covered entity are now directly covered by [...]]]></description>
			<content:encoded><![CDATA[<p>The new data breach notification rules for covered entities and PCHR Platform providers go into effect on September 23 (for covered entities) and September 24 (PCHR Platforms and providers). There&#8217;s a <a href="http://fcw.com/articles/2009/09/21/hhs-breach-notification-rule-in-effect-sept.-23.aspx">nice wrap-up here</a>.</p>
<p>One big change from the prior environment is that the business associates of a HIPAA covered entity are now directly covered by the rule. Previously, protections were extended by contract with the original CE. Practically, I don&#8217;t think this makes a huge difference, since the Covered Entities would have just gone back and renegotiated the existing agreements to share the notification burden. Extending those requirements through regulation probably even saves some money and lawyer time, since there&#8217;s now no need to go and revisit all of those agreements.</p>
<p>The final rule does, however, have a pretty substantial loophole. Notification is required only when there is a chance of substantial harm to the person whose data was released. And that determination is made by the covered entity. Obviously, there is a huge opportunity for things to go wrong here. But the opposite extreme &#8211; mandating disclosure at all times &#8211; would be overly burdensome and would also have the very negative side effect of scaring consumers who receive breach notifications for trivial things &#8211; their city and phone number were accidentally released to a contractor, who then had a laptop stolen while on vacation in Guatemala. Odds of harm to the patient are pretty close to zero, and putting the burden on them to worry about sophisticated identity thieves is not particularly fair.</p>
<p>So I don&#8217;t think they got this one entirely right. A public audit process might be the solution &#8211; all breaches need to be disclosed, and outside groups can choose to make a stink about situations where individual notifications should have occurred but didn&#8217;t. I suspect this would get behavior into line pretty quickly.</p>
]]></content:encoded>
			<wfw:commentRss>http://info.rmatics.org/2009/09/22/a-final-word-on-breach-notification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cost Savings and Retail Clinics</title>
		<link>http://info.rmatics.org/2009/09/11/cost-savings-and-retail-clinics/</link>
		<comments>http://info.rmatics.org/2009/09/11/cost-savings-and-retail-clinics/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 20:43:48 +0000</pubDate>
		<dc:creator>William Crawford</dc:creator>
				<category><![CDATA[Health Policy]]></category>
		<category><![CDATA[health care costs]]></category>
		<category><![CDATA[MinuteClinic]]></category>

		<guid isPermaLink="false">http://info.rmatics.org/?p=368</guid>
		<description><![CDATA[I&#8217;ve been interested in retail clinics for years. It&#8217;s a wonderfully simple idea: there are a range of conditions for which a doctor just isn&#8217;t the right tool for the job, any more than you need a trained engineer to change a light-bulb.  If someone has inflamed tonsils (pharyngitis), a urinary tract infection or an [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been interested in retail clinics for years. It&#8217;s a wonderfully simple idea: there are a range of conditions for which a doctor just isn&#8217;t the right tool for the job, any more than you need a trained engineer to change a light-bulb.  If someone has inflamed tonsils (pharyngitis), a urinary tract infection or an ear infection (otitis media &#8211; you&#8217;ll need the vocab for the next section) sending them to a physician or an emergency room makes no sense &#8211; you have an expensive provider delivering by-the-book care. And in the event that the patient has something serious masquerading as something common? They&#8217;ll almost certainly get the basic care anyway and end up coming back in later.</p>
<p>Retail clinics, such as CVS&#8217; MinuteClinic chain, are intended to provide an alternative. Rather than going to the Emergency Room, you go to your local drug store, get checked out in a few minutes and are handed the prescription. If your condition goes off-script, they send you to a doctor or to the ER. The clinics are manned by nurse practioners or physician assistants, depending on the state, and supervised by a physician who may be off site.</p>
<p>Until recently we haven&#8217;t had much insight into the effectiveness of retail clinics. That&#8217;s beginning to change. In the current issue of the Annals of Internal Medicine, Ateev Mehrotra and colleagues analyze the long-term costs of care in retail clinics in Minnesota for the three conditions I listed above. You can read <a href="http://www.annals.org/cgi/content/abstract/151/5/321">the abstract of the article here</a>.  Here&#8217;s the summary:</p>
<blockquote><p>Overall costs of care for episodes initiated at retail clinics<br />
were substantially lower than those of matched episodes initiated at<br />
physician offices, urgent care centers, and emergency departments<br />
($110 vs. $166, $156, and $570, respectively; P &lt; 0.001 for each<br />
comparison). Prescription costs were similar in retail clinics, physician<br />
offices, and urgent care centers ($21, $21, and $22), as were<br />
aggregate quality scores (63.6%, 61.0%, and 62.6%) and patient’s<br />
receipt of preventive care (14.5%, 14.2%, and 13.7%) (P &lt; 0.05<br />
vs. retail clinics). In emergency departments, average prescription<br />
costs were higher and aggregate quality scores were significantly<br />
lower than in other settings.</p></blockquote>
<p>In other words &#8211; if a patient goes to the retail clinic rather than ER, the insurance company saves $460, and the patient gets care faster and suffers less discomfort.  The quality scores show that retail clinic customers do not suffer in terms of other healthcare services (such as scheduled preventive procedures) compared to those who seek initial care in a physician office.</p>
<p>As we like to say in healthcare economics, this is only an initial study. It&#8217;s biggest weakness is an inability to control for severity of the underlying condition &#8211; it&#8217;s conceivable that only healthier patients took a chance on the retail clinics, leaving the physician offices and emergency rooms to handle a much sicker group. I don&#8217;t think this is likely, however. With these three conditions it is difficult for the patient to judge severity when the disease presents itself. Minnesota is particularly well seved by retail clinics &#8211; it&#8217;s MinuteClinic&#8217;s home turf &#8211; so access issues are also unlikely to play a role.</p>
<p>In general, I think these are promising results, and they should help encourage insurance providers to reimburse for care delivered in the retail clinic setting. That should help with adoption &#8211; the market has not exploded, and MinuteClinic has even resorted to running some clinics seasonally.</p>
<p>Oh, and for those looking for an informatics connection: retail clinics tend to be pretty good at operating electronically and making patient data available to the patient upon request. MinuteClinic, again, was one of the early Google Health partners, and they&#8217;ve long seen electronic health information exchange as a key component of their integration with local health systems.</p>
]]></content:encoded>
			<wfw:commentRss>http://info.rmatics.org/2009/09/11/cost-savings-and-retail-clinics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
