<?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>Javatech &#187; Eclipse</title>
	<atom:link href="http://javatech.org/category/eclipse/feed/" rel="self" type="application/rss+xml" />
	<link>http://javatech.org</link>
	<description>The Bleeding Edge of Java Technology</description>
	<lastBuildDate>Wed, 24 Jun 2009 22:30:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A Conventionally Annotated Configuration &#8211; Spring, Hibernate, Eclipse</title>
		<link>http://javatech.org/2009/02/a-conventionally-annotated-configuration-spring-hibernate-eclipse/</link>
		<comments>http://javatech.org/2009/02/a-conventionally-annotated-configuration-spring-hibernate-eclipse/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 07:31:29 +0000</pubDate>
		<dc:creator>deevis</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://javatech.org/2009/02/18/a-conventionally-annotated-configuration-spring-hibernate-eclipse/</guid>
		<description><![CDATA[I&#8217;m starting on a personal project and decided I was going to take the time to do things right.  This means different things to different folks, but to me it basically entails:

Using the latest and greatest versions of everything.  Eclipse 3.4.  Hibernate 3.3.1.  Spring 2.5.6.  Tomcat 6.  Maven 2.0.9.  Java 6 ( 7? ), DWR [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m starting on a personal project and decided I was going to take the time to do things right.  This means different things to different folks, but to me it basically entails:</p>
<ol>
<li>Using the latest and greatest versions of everything.  Eclipse 3.4.  Hibernate 3.3.1.  Spring 2.5.6.  Tomcat 6.  Maven 2.0.9.  Java 6 ( 7? ), DWR 3.0.</li>
<li>Using Eclipse plugins to do as much as possible without causing headaches</li>
<li>Using as little XML configuration as possible &#8211; conventions, conventions, conventions!!!</li>
<li>Using JPA annotations for ORM classes.</li>
<li>Using Annotations for IOC dependencies.</li>
<li>Using Annotations for Transactional demarcation.</li>
<li>Using Annotations for MVC mappings.</li>
<li>Using very basic JSTL-based JSP&#8217;s for views.</li>
<li>Using Sitemesh to present a uniform look and feel across all pages.</li>
<li>For icing on the cake I&#8217;d like to also include GWT components.</li>
</ol>
<p><strong>Using the latest and greatest versions of everything</strong><br />
If you install Eclipse 3.4 first, and then install the Maven Integration plugin, it will greatly simplify things.  Just add Maven Integration to your project and then use &#8220;Add Dependency&#8221; option to quickly scour the entire repository and find the exact groupIds, artifactIds, and versions you want.  It also has a great view of the dependency hierarchy!  Getting all of these bleeding-edge versions to play nice together has its fair share of challenges.</p>
<p><strong> Using as little XML configuration as possible</strong></p>
<p><strong>Using Eclipse plugins to do as much as possible without causing headaches</strong></p>
<p>I already mentioned Maven Integration above to help with getting the LAGV of all the technologies being used.  Also of great value and import are SysDeo and  Subclipse.  Sysdeo is great for deploying and debugging your webapp in Tomcat.  Subclipse is great for seamless integration with an SVN repostiory.  Yes &#8211; use SCM on personal projects, you never know when you&#8217;ll need to revert or bring the code down onto a new machine.</p>
<p>But where do we draw the line here?  When do we have so much annotation cruft that an externalized xml configuration will seem like the ideal solution ( from whence we currently come in search of clarity! ).</p>
<p><strong>Using very basic JSTL-based JSP&#8217;s for views</strong><br />
OK &#8211; well, tonight I was getting ready to put together the first couple of jsp&#8217;s now that the @Controller mappings are working and the pages are being served correctly.  I&#8217;ve got the method mapped correctly with @RequestMapping and I&#8217;ve got the model being put into pagescope with @ModelAttribute.  I&#8217;m ready to loop through a List using JSTL forEach.  But wait, can this possibly be true?  Tomcat6 has no implementation of JSTL.  JSTL 1.2 is the LAGV and the JSTL 1.1 is abandoned.  Only *Glassfish* ships with the reference implementation of JSTL 1.2?!?  Oh brother.  Thanks to <a title="Tomcat6 depends on Glassfish?!?" href="http://www.mularien.com/blog/2008/02/19/tutorial-how-to-set-up-tomcat-6-to-work-with-jstl-12/">Peter Mularien for writing a nice post</a> informing me of this.</p>
<p>As if needing to download and install glassfish in order to get the JSTL 1.2 implementation jars for Tomcat6 wasn&#8217;t bad enough, well I hit a couple more snags after that.  First of all, I want to know who decided on the namespaces for JSTL 1.1 vs 1.2.  Here they are:</p>
<p>1.0  == &lt;%@taglib prefix=&#8221;c&#8221; uri=&#8221;http://java.sun.com/jsp/core&#8221; %&gt;</p>
<p>1.1 &amp; 1.2 ==&lt;%@taglib prefix=&#8221;c&#8221; uri=&#8221;http://java.sun.com/jsp/jstl/core&#8221; %&gt;</p>
<p>I mean all they did was add the &#8220;jstl&#8221; into the path?!?  I&#8217;m supposed to remember this?  OK &#8211; I&#8217;ll try harder to remember for next time.</p>
<p>Then, I learned that Maven2 doesn&#8217;t copy &#8220;system&#8221; provided jars into WEB-INF/lib by default and they need to be placed there manually as part of the project.  So, the appserv-jstl.jar I copied from glassfish wasn&#8217;t being included because I linked Maven to it as a system ( vs provided, or compile, or test, etc&#8230; ) dependency.</p>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2009/02/a-conventionally-annotated-configuration-spring-hibernate-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
