<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6420029857026901711</id><updated>2012-02-09T17:32:47.885+01:00</updated><category term='Development Tools'/><category term='components'/><category term='java'/><category term='ideas'/><category term='IDE'/><category term='tapestry 5'/><category term='jetty'/><category term='Programming'/><category term='library'/><category term='Web application'/><title type='text'>bbWebCraft</title><subtitle type='html'>Creating web apps with Tapestry 5</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://bbwebcraft.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://bbwebcraft.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Borut Bolčina</name><uri>https://profiles.google.com/100412320755782895986</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-lSS0jJqb0lE/AAAAAAAAAAI/AAAAAAAAAAA/Ilphj3SxrAI/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6420029857026901711.post-2968625008878322062</id><published>2009-03-15T20:05:00.019+01:00</published><updated>2009-03-15T21:16:24.342+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='tapestry 5'/><category scheme='http://www.blogger.com/atom/ns#' term='library'/><category scheme='http://www.blogger.com/atom/ns#' term='components'/><title type='text'>Task 6 - Create Tapestry 5 components library</title><content type='html'>One of the promises of Tapestry 5 is easy creation of components. The word component can trigger lots of different associations in people’s minds. I guess for the majority of web developers the component means a GUI  thing. For someone from the middle management a component might as well be a forum system with all the bells and whistles. For old school guys the first impression when the word component is a word of discussion might mean an architectural thing.&lt;br /&gt;&lt;br /&gt;To me, the term components, is quite a familiar for a number of years now.  When I started with web application development I was a lucky man as &lt;a href="http://developer.apple.com/tools/webobjects/"&gt;Web Objects&lt;/a&gt; were my first contact in a jungle of languages and frameworks out there. You can imagine (I hope) the disappointment when I had to switch to JSP. Only now I got an opportunity to use similar technology again!&lt;br /&gt;&lt;br /&gt;Until now, all my posts were talking about preparing the development environment and this one feels like I am jumping ahead of time. In a sense this is true, but I think creating a place to put the goodies you will create and reuse is a good start. Why would you create a component and later copy it to a library? Let’s do it right now.&lt;br /&gt;&lt;br /&gt;The tools are: Eclipse Ganymede, &lt;a href="http://m2eclipse.codehaus.org/"&gt;m2eclipse 0.9.7&lt;/a&gt;, Maven 2.0.10 and Java 6.&lt;br /&gt;&lt;br /&gt;In Eclipse click the New button&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_dW-BmW1h1P4/Sb1SZwEAh_I/AAAAAAAABSY/zV5Ooc_MMYs/s1600-h/task6-01-new.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 375px; height: 187px;" src="http://3.bp.blogspot.com/_dW-BmW1h1P4/Sb1SZwEAh_I/AAAAAAAABSY/zV5Ooc_MMYs/s400/task6-01-new.png" alt="" id="BLOGGER_PHOTO_ID_5313493737718974450" border="0"&gt;&lt;/a&gt;then type maven in the filter box and select Maven Project&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_dW-BmW1h1P4/Sb1SqCpXGsI/AAAAAAAABSg/KCWC8csA-kE/s1600-h/task6-02-new-maven-project.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 381px;" src="http://3.bp.blogspot.com/_dW-BmW1h1P4/Sb1SqCpXGsI/AAAAAAAABSg/KCWC8csA-kE/s400/task6-02-new-maven-project.png" alt="" id="BLOGGER_PHOTO_ID_5313494017585388226" border="0"&gt;&lt;/a&gt;Click Next and select Create a simple project.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_dW-BmW1h1P4/Sb1WMn40pkI/AAAAAAAABSo/53i1u47xNmM/s1600-h/task6-03-new-maven-project-simple.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 306px;" src="http://2.bp.blogspot.com/_dW-BmW1h1P4/Sb1WMn40pkI/AAAAAAAABSo/53i1u47xNmM/s400/task6-03-new-maven-project-simple.png" alt="" id="BLOGGER_PHOTO_ID_5313497910232786498" border="0"&gt;&lt;/a&gt;Click Next and fill-in the configuration details.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_dW-BmW1h1P4/Sb1Wy-DYLvI/AAAAAAAABSw/WrLtD7VIxWM/s1600-h/task6-04-new-maven-project-configure.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 345px; height: 400px;" src="http://3.bp.blogspot.com/_dW-BmW1h1P4/Sb1Wy-DYLvI/AAAAAAAABSw/WrLtD7VIxWM/s400/task6-04-new-maven-project-configure.png" alt="" id="BLOGGER_PHOTO_ID_5313498569017667314" border="0"&gt;&lt;/a&gt;All of the values I have filled-in do not have any special meaning. You can name your GroupId and ArtifactId anything you want.&lt;br /&gt;&lt;br /&gt;Now we will skip the last step of the wizard (adding dependencies) and just press Finish. You should see a new project in the Project Explorer.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_dW-BmW1h1P4/Sb1XEzGHhPI/AAAAAAAABS4/B0ItVVuJy8U/s1600-h/task6-05-package-explorer-comp-library.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 311px; height: 265px;" src="http://2.bp.blogspot.com/_dW-BmW1h1P4/Sb1XEzGHhPI/AAAAAAAABS4/B0ItVVuJy8U/s400/task6-05-package-explorer-comp-library.png" alt="" id="BLOGGER_PHOTO_ID_5313498875314013426" border="0"&gt;&lt;/a&gt;Now double click the &lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/Project_Object_Model" title="Project Object Model" rel="wikipedia"&gt;pom&lt;/a&gt;.xml to open it in Maven POM Editor. The content should be something like:&lt;br /&gt;&lt;pre class="brush: xml"&gt;&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xsi="http://www.w3.org/2001/XMLSchema-instance" schemalocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;&lt;br /&gt;  &lt;modelversion&gt;4.0.0&lt;/modelversion&gt;&lt;br /&gt;  &lt;groupid&gt;bb.webcraft.tapestry&lt;/groupid&gt;&lt;br /&gt;  &lt;artifactid&gt;components-library&lt;/artifactid&gt;&lt;br /&gt;  &lt;name&gt;bbWebCraft Tapestry 5 components library&lt;/name&gt;&lt;br /&gt;  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;&lt;br /&gt;  &lt;description&gt;A collection of Tapestry 5 components&lt;/description&gt;&lt;br /&gt;&lt;/project&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;We need to add some more elements in the pom for this project to become a Tapestry 5 components library. A bare minimum is:&lt;br /&gt;&lt;pre class="brush: xml"&gt;&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xsi="http://www.w3.org/2001/XMLSchema-instance" schemalocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;&lt;br /&gt;  &lt;modelversion&gt;4.0.0&lt;/modelversion&gt;&lt;br /&gt;  &lt;groupid&gt;bb.webcraft.tapestry&lt;/groupid&gt;&lt;br /&gt;  &lt;artifactid&gt;components-library&lt;/artifactid&gt;&lt;br /&gt;  &lt;name&gt;bbWebCraft Tapestry 5 components library&lt;/name&gt;&lt;br /&gt;  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;&lt;br /&gt;  &lt;description&gt;A collection of Tapestry 5 components&lt;/description&gt;&lt;br /&gt;  &lt;dependencies&gt;&lt;br /&gt;      &lt;dependency&gt;&lt;br /&gt;          &lt;groupid&gt;org.apache.tapestry&lt;/groupid&gt;&lt;br /&gt;          &lt;artifactid&gt;tapestry-core&lt;/artifactid&gt;&lt;br /&gt;          &lt;version&gt;${tapestry-release-version}&lt;/version&gt;&lt;br /&gt;      &lt;/dependency&gt;&lt;br /&gt;  &lt;/dependencies&gt;&lt;br /&gt;  &lt;build&gt;&lt;br /&gt;      &lt;plugins&gt;&lt;br /&gt;          &lt;plugin&gt;&lt;br /&gt;              &lt;groupid&gt;org.apache.maven.plugins&lt;/groupid&gt;&lt;br /&gt;              &lt;artifactid&gt;maven-compiler-plugin&lt;/artifactid&gt;&lt;br /&gt;              &lt;configuration&gt;&lt;br /&gt;                  &lt;source&gt;1.5&lt;/source&gt;&lt;br /&gt;                  &lt;target&gt;1.5&lt;/target&gt;&lt;br /&gt;                  &lt;optimize&gt;true&lt;/optimize&gt;&lt;br /&gt;              &lt;/configuration&gt;&lt;br /&gt;          &lt;/plugin&gt;&lt;br /&gt;          &lt;plugin&gt;&lt;br /&gt;              &lt;groupid&gt;org.apache.maven.plugins&lt;/groupid&gt;&lt;br /&gt;              &lt;artifactid&gt;maven-jar-plugin&lt;/artifactid&gt;&lt;br /&gt;              &lt;configuration&gt;&lt;br /&gt;                  &lt;archive&gt;&lt;br /&gt;                      &lt;manifestentries&gt;&lt;br /&gt;                          &lt;tapestry-module-classes&gt;bb.webcraft.tapestry.library.services.LibraryModule&lt;/tapestry-module-classes&gt;&lt;br /&gt;                      &lt;/manifestentries&gt;&lt;br /&gt;                  &lt;/archive&gt;&lt;br /&gt;              &lt;/configuration&gt;&lt;br /&gt;          &lt;/plugin&gt;&lt;br /&gt;      &lt;/plugins&gt;&lt;br /&gt;  &lt;/build&gt;&lt;br /&gt;  &lt;properties&gt;&lt;br /&gt;      &lt;tapestry-release-version&gt;5.0.18&lt;/tapestry-release-version&gt;&lt;br /&gt;  &lt;/properties&gt;&lt;br /&gt;&lt;/project&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Please note that Tapestry-Module-Classes could as well be&lt;br /&gt;&lt;pre class="brush: xml"&gt;&lt;tapestry-module-classes&gt;com.acme.services.MyModule&lt;/tapestry-module-classes&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;but would be a bad practice. The java packages you will create in this library project will have the same root as the GroupId (&lt;span style="font-family: courier new;"&gt;bb.webcraft.tapestry&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;Let’s create a package &lt;span style="font-family: courier new;"&gt;bb.webcraft.tapestry.library.services&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_dW-BmW1h1P4/Sb1Y3t_NXGI/AAAAAAAABTA/hV4Cg5QQsXM/s1600-h/task6-06-new-package-services.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 232px;" src="http://3.bp.blogspot.com/_dW-BmW1h1P4/Sb1Y3t_NXGI/AAAAAAAABTA/hV4Cg5QQsXM/s400/task6-06-new-package-services.png" alt="" id="BLOGGER_PHOTO_ID_5313500849627815010" border="0"&gt;&lt;/a&gt;and then a java class named &lt;span style="font-family: courier new;"&gt;LibraryModule&lt;/span&gt;.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_dW-BmW1h1P4/Sb1ZAkvvfwI/AAAAAAAABTI/9HGh_ZYUm9E/s1600-h/task6-07-new-java-class-library.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 344px; height: 400px;" src="http://1.bp.blogspot.com/_dW-BmW1h1P4/Sb1ZAkvvfwI/AAAAAAAABTI/9HGh_ZYUm9E/s400/task6-07-new-java-class-library.png" alt="" id="BLOGGER_PHOTO_ID_5313501001765846786" border="0"&gt;&lt;/a&gt;This is now your library’s IoC module. In order for Tapestry to know where to search for your component’s classes you need to make a contribution to the &lt;a href="http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/services/ComponentClassResolver.html"&gt;&lt;span style="font-family: courier new;"&gt;ComponentClassResolver&lt;/span&gt;&lt;/a&gt; service configuration&lt;br /&gt;&lt;pre class="brush: java"&gt;package bb.webcraft.tapestry.library.services;&lt;br /&gt;&lt;br /&gt;import org.apache.tapestry5.ioc.Configuration;&lt;br /&gt;import org.apache.tapestry5.services.LibraryMapping;&lt;br /&gt;&lt;br /&gt;public class LibraryModule {&lt;br /&gt;  public static void contributeComponentClassResolver(Configuration&amp;lt;LibraryMapping&amp;gt; configuration) {&lt;br /&gt;      configuration.add(new LibraryMapping("bbwcraft", "bb.webcraft.tapestry.library"));&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;The project is now ready. If it had any components, you would just put the jar on your web application’s class path and use it. You can create a jar by typing &lt;span style="font-family: courier new;"&gt;mvn package&lt;/span&gt; in the console or by right clicking on a project root (or pom.xml) and selecting Run As / Maven package.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_dW-BmW1h1P4/Sb1ZtWbGTgI/AAAAAAAABTQ/nBmIWSH7FCU/s1600-h/task6-08-runas-maven-package.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 230px;" src="http://3.bp.blogspot.com/_dW-BmW1h1P4/Sb1ZtWbGTgI/AAAAAAAABTQ/nBmIWSH7FCU/s400/task6-08-runas-maven-package.png" alt="" id="BLOGGER_PHOTO_ID_5313501771015278082" border="0"&gt;&lt;/a&gt;A jar named &lt;span style="font-family: courier new;"&gt;components-library-0.0.1-SNAPSHOT.jar&lt;/span&gt; should be created in the target folder. As you may know a jar has to be installed (&lt;span style="font-family: courier new;"&gt;mvn install&lt;/span&gt;) in your local maven repository to be used by other mavenized projects.  You can then use the library by referencing it in your application’s pom like this:&lt;br /&gt;&lt;pre class="brush: xml"&gt;&lt;dependency&gt;&lt;br /&gt;  &lt;groupid&gt;bb.webcraft.tapestry&lt;/groupid&gt;&lt;br /&gt;  &lt;artifactid&gt;components-library&lt;/artifactid&gt;&lt;br /&gt;  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;&lt;br /&gt;&lt;/dependency&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now would be the time and place to mention how to use the component from the library in some T5 application, but since we haven’t actually created one, we will leave this for the next post.&lt;br /&gt;&lt;br /&gt;Before we end, let’s add another section in the library’s pom (under the &amp;lt;project&amp;gt; element).&lt;br /&gt;&lt;pre class="brush: xml"&gt;&lt;reporting&gt;&lt;br /&gt;  &lt;plugins&gt;&lt;br /&gt;      &lt;plugin&gt;&lt;br /&gt;          &lt;groupid&gt;org.apache.tapestry&lt;/groupid&gt;&lt;br /&gt;          &lt;artifactid&gt;tapestry-component-report&lt;/artifactid&gt;&lt;br /&gt;          &lt;version&gt;${tapestry-release-version}&lt;/version&gt;&lt;br /&gt;          &lt;configuration&gt;&lt;br /&gt;              &lt;rootpackage&gt;bb.webcraft.tapestry.library&lt;/rootpackage&gt;&lt;br /&gt;          &lt;/configuration&gt;&lt;br /&gt;      &lt;/plugin&gt;&lt;br /&gt;  &lt;/plugins&gt;&lt;br /&gt;&lt;/reporting&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This is very important, as you and Tapestry will create a good documentation about your components. I will also talk about how to write the documentation for the components in the next post where we will actually create a component – a date input component composed of three combo boxes (day, month, year) suitable for selecting dates far in the past or future.&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/1a4ce423-a37b-4d81-9e78-d46f6bd9d408/" title="Zemified by Zemanta"&gt;&lt;img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=1a4ce423-a37b-4d81-9e78-d46f6bd9d408" alt="Reblog this post [with Zemanta]"&gt;&lt;/a&gt;&lt;span class="zem-script more-related"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6420029857026901711-2968625008878322062?l=bbwebcraft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bbwebcraft.blogspot.com/feeds/2968625008878322062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bbwebcraft.blogspot.com/2009/03/task-6-create-tapestry-5-components.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/2968625008878322062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/2968625008878322062'/><link rel='alternate' type='text/html' href='http://bbwebcraft.blogspot.com/2009/03/task-6-create-tapestry-5-components.html' title='Task 6 - Create Tapestry 5 components library'/><author><name>Borut Bolčina</name><uri>https://profiles.google.com/100412320755782895986</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-lSS0jJqb0lE/AAAAAAAAAAI/AAAAAAAAAAA/Ilphj3SxrAI/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_dW-BmW1h1P4/Sb1SZwEAh_I/AAAAAAAABSY/zV5Ooc_MMYs/s72-c/task6-01-new.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6420029857026901711.post-3235887208918696124</id><published>2009-03-10T23:43:00.003+01:00</published><updated>2009-03-11T00:31:14.706+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ideas'/><category scheme='http://www.blogger.com/atom/ns#' term='tapestry 5'/><title type='text'>Tapestry 5 Caffe</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_dW-BmW1h1P4/Sbb37oDb29I/AAAAAAAABSQ/xdi-rmP5tgw/s1600-h/reflective.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 242px; height: 240px;" src="http://2.bp.blogspot.com/_dW-BmW1h1P4/Sbb37oDb29I/AAAAAAAABSQ/xdi-rmP5tgw/s400/reflective.jpg" alt="" id="BLOGGER_PHOTO_ID_5311705414266248146" border="0" /&gt;&lt;/a&gt;Have an idea? Write it down.&lt;br /&gt;&lt;br /&gt;Have a &lt;a class="zem_slink" href="http://tapestry.apache.org/" title="Tapestry (programming)" rel="homepage"&gt;Tapestry&lt;/a&gt; 5 related idea. Visit &lt;a href="http://tapestry5.ideascale.com/"&gt;Tapestry 5 Caffe&lt;/a&gt;!&lt;br /&gt;&lt;br /&gt;This site is purely a &lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/Brainstorming" title="Brainstorming" rel="wikipedia"&gt;brainstorming&lt;/a&gt; place where you can post your ideas or comment and vote on other's. I feel it offers more structure than mailing list where ideas can easily get lost and is lighter and friendlier than &lt;a href="https://issues.apache.org/jira/browse/TAP5"&gt;JIRA&lt;/a&gt;, but by no means a replacement. It is a place where ideas can be shared and see the popularity for each suggestion anyone can contribute. It can be viewed as &lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/Vox_populi" title="Vox populi" rel="wikipedia"&gt;vox populi&lt;/a&gt;, so the creators and people more involved in Tapestry 5 development can adjust their bearings if needed.&lt;br /&gt;&lt;br /&gt;Maybe your idea will be picked up by Howard and others - a fresh perspective is allways welcome.&lt;br /&gt;&lt;br /&gt;The site has several categories:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Website/Documentation (suggestions to improve the documentation and web site in general)&lt;/li&gt;&lt;li&gt;Components (new components ideas, improvements on existing ones)&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.arsmachina.com.br/"&gt;ArsMachina&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://jumpstart.doublenegative.com.au/"&gt;JumpStart&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.chenillekit.org/"&gt;ChenilleKit&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://equanda.org/equanda-tapestry5/index.html"&gt;Equanda&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Go drink a cup of coffee.&lt;br /&gt;&lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/e2a9cb6d-0da7-431c-9f7a-4cbe707c35e1/" title="Zemified by Zemanta"&gt;&lt;img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=e2a9cb6d-0da7-431c-9f7a-4cbe707c35e1" alt="Reblog this post [with Zemanta]" /&gt;&lt;/a&gt;&lt;span class="zem-script more-related"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6420029857026901711-3235887208918696124?l=bbwebcraft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bbwebcraft.blogspot.com/feeds/3235887208918696124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bbwebcraft.blogspot.com/2009/03/tapestry-5-caffe.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/3235887208918696124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/3235887208918696124'/><link rel='alternate' type='text/html' href='http://bbwebcraft.blogspot.com/2009/03/tapestry-5-caffe.html' title='Tapestry 5 Caffe'/><author><name>Borut Bolčina</name><uri>https://profiles.google.com/100412320755782895986</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-lSS0jJqb0lE/AAAAAAAAAAI/AAAAAAAAAAA/Ilphj3SxrAI/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_dW-BmW1h1P4/Sbb37oDb29I/AAAAAAAABSQ/xdi-rmP5tgw/s72-c/reflective.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6420029857026901711.post-7866518072187993895</id><published>2009-02-07T22:15:00.008+01:00</published><updated>2009-02-12T18:28:10.433+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='tapestry 5'/><category scheme='http://www.blogger.com/atom/ns#' term='components'/><title type='text'>Wishlist and survey for Tapestry 5 components</title><content type='html'>I was wondering what components people are looking for when developing with &lt;a class="zem_slink" href="http://tapestry.apache.org/" title="Tapestry (programming)" rel="homepage"&gt;Tapestry&lt;/a&gt; 5. There are 50+ components baked in the framework's core and there are 39 at the &lt;a href="http://www.chenillekit.org/"&gt;http://www.chenillekit.org&lt;/a&gt;.  9 more at &lt;a href="http://equanda.org/equanda-tapestry5/"&gt;http://equanda.org/equanda-tapestry5/&lt;/a&gt; and 1 at &lt;a href="http://code.google.com/p/tapestry5-treegrid/"&gt;http://code.google.com/p/tapestry5-treegrid/&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Are there any other libraries out there?&lt;br /&gt;&lt;br /&gt;Update on february 11&lt;sup&gt;th&lt;/sup&gt;:&lt;br /&gt;I left out &lt;a href="http://lombok.demon.co.uk/tapestry5Demo/"&gt;http://lombok.demon.co.uk/tapestry5Demo&lt;/a&gt; with 9 more components.&lt;br /&gt;&lt;br /&gt;I made a list of 36 additional UI components in the form of a survey. Please take this &lt;a href="http://www.questionpro.com/akira/TakeSurvey?id=1151880"&gt;survey&lt;/a&gt;, maybe some of the components will be part of some library because of it. Maybe some of them will evolve and maybe some of them will be unique to any web framework out there.&lt;br /&gt;&lt;br /&gt;You can follow the results by visiting &lt;a href="http://www.questionpro.com/akira/ShowResults?id=1151880&amp;amp;mode=data"&gt;Real-time Summary Report&lt;/a&gt; and &lt;a href="http://www.questionpro.com/akira/ShowResults?id=1151880&amp;amp;mode=text"&gt;comments&lt;/a&gt;.&lt;br /&gt;&lt;!-- BEGIN QuestionPro Dynamic Survey Badge HTML --&gt;&lt;br /&gt;&lt;a href="http://www.questionpro.com/" title="online surveys"&gt;&lt;img alt="online surveys" src="http://www.questionpro.com//akira/sbadge/538784-1151880" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;!-- END QuestionPro Dynamic Survey Badge HTML --&gt;&lt;br /&gt;Thanks!      &lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/57c89923-3590-4807-8e30-5cf08004c9ac/" title="Zemified by Zemanta"&gt;&lt;img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=57c89923-3590-4807-8e30-5cf08004c9ac" alt="Reblog this post [with Zemanta]" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6420029857026901711-7866518072187993895?l=bbwebcraft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bbwebcraft.blogspot.com/feeds/7866518072187993895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bbwebcraft.blogspot.com/2009/02/wishlist-and-survey-for-tapestry-5.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/7866518072187993895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/7866518072187993895'/><link rel='alternate' type='text/html' href='http://bbwebcraft.blogspot.com/2009/02/wishlist-and-survey-for-tapestry-5.html' title='Wishlist and survey for Tapestry 5 components'/><author><name>Borut Bolčina</name><uri>https://profiles.google.com/100412320755782895986</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-lSS0jJqb0lE/AAAAAAAAAAI/AAAAAAAAAAA/Ilphj3SxrAI/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6420029857026901711.post-4657376298723745496</id><published>2009-02-02T23:48:00.004+01:00</published><updated>2009-02-02T23:55:55.145+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IDE'/><category scheme='http://www.blogger.com/atom/ns#' term='tapestry 5'/><title type='text'>Which IDE are you using for developing Tapestry 5 applications?</title><content type='html'>The poll is closed after 45 days and the results are:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Eclipse (30 votes, 71%)&lt;/li&gt;&lt;li&gt;IDEA (8 votes, 19%)&lt;/li&gt;&lt;li&gt;NetBeans (6 votes, 14%)&lt;/li&gt;&lt;/ol&gt;Happy weaving to all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6420029857026901711-4657376298723745496?l=bbwebcraft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bbwebcraft.blogspot.com/feeds/4657376298723745496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bbwebcraft.blogspot.com/2009/02/which-ide-are-you-using-for-developing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/4657376298723745496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/4657376298723745496'/><link rel='alternate' type='text/html' href='http://bbwebcraft.blogspot.com/2009/02/which-ide-are-you-using-for-developing.html' title='Which IDE are you using for developing Tapestry 5 applications?'/><author><name>Borut Bolčina</name><uri>https://profiles.google.com/100412320755782895986</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-lSS0jJqb0lE/AAAAAAAAAAI/AAAAAAAAAAA/Ilphj3SxrAI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6420029857026901711.post-8972513290578543768</id><published>2009-01-31T18:59:00.015+01:00</published><updated>2009-03-16T20:00:19.511+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='tapestry 5'/><title type='text'>Task 5 - Customize Eclipse for Tapestry 5 code editing</title><content type='html'>When coding, sometimes we (at least me) forget to use all the help from an IDE we are coding in. One of techniques is context help.&lt;br /&gt;&lt;br /&gt;I am sure you are all used to typing&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_dW-BmW1h1P4/SYSS0vjn7hI/AAAAAAAABQ4/axKHrpde9R8/s1600-h/task5-01-context-help.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 143px;" src="http://4.bp.blogspot.com/_dW-BmW1h1P4/SYSS0vjn7hI/AAAAAAAABQ4/axKHrpde9R8/s400/task5-01-context-help.png" alt="" id="BLOGGER_PHOTO_ID_5297520496511282706" border="0" /&gt;&lt;/a&gt;so you quicker create a for loop.&lt;br /&gt;&lt;br /&gt;To speed up developing web applications with Tapestry 5, I have created 4 templates just to show the principle. I will most likely create more as I learn the framework and find the patterns that are recurring more often.&lt;br /&gt;&lt;br /&gt;Get the templates at &lt;a href="http://sites.google.com/site/bbwebcraft/"&gt;http://sites.google.com/site/bbwebcraft/&lt;/a&gt; and import them into the Eclipse.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_dW-BmW1h1P4/SYSTVQ01QcI/AAAAAAAABRA/hrq4t1VxwNw/s1600-h/task5-02-java-editor-templates.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 304px;" src="http://1.bp.blogspot.com/_dW-BmW1h1P4/SYSTVQ01QcI/AAAAAAAABRA/hrq4t1VxwNw/s400/task5-02-java-editor-templates.png" alt="" id="BLOGGER_PHOTO_ID_5297521055197643202" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;After importing you should see 4 new templates in the list:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_dW-BmW1h1P4/SYSTg_9HRpI/AAAAAAAABRI/EKAinjAsDgc/s1600-h/task5-03-templates-imported.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 304px;" src="http://1.bp.blogspot.com/_dW-BmW1h1P4/SYSTg_9HRpI/AAAAAAAABRI/EKAinjAsDgc/s400/task5-03-templates-imported.png" alt="" id="BLOGGER_PHOTO_ID_5297521256827405970" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Let’s try them out one by one.&lt;br /&gt;&lt;br /&gt;Open any Tapestry 5 project you have in your workspace – maybe you have the one we created in  &lt;a href="http://bbwebcraft.blogspot.com/2008/12/task-1-create-skeleton-tapestry-5.html"&gt;task 1&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Open some page class like &lt;span style="font-family:courier new;"&gt;Index.java&lt;/span&gt;, put the cursor in the class body, type &lt;span style="font-family:courier new;"&gt;t5&lt;/span&gt; and press Ctrl+Space.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_dW-BmW1h1P4/SYSUI0op9gI/AAAAAAAABRQ/8DzV5mGamuA/s1600-h/task5-04-selecting-t5-actionLink.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 237px;" src="http://3.bp.blogspot.com/_dW-BmW1h1P4/SYSUI0op9gI/AAAAAAAABRQ/8DzV5mGamuA/s400/task5-04-selecting-t5-actionLink.png" alt="" id="BLOGGER_PHOTO_ID_5297521940983576066" border="0" /&gt;&lt;/a&gt;You can see the 4 templates we have imported. Just select the first one – ActionLink.&lt;br /&gt;&lt;br /&gt;A lot of code gets inserted which is good for a complete Tapestry 5 newbie and not so good for others.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: java"&gt;&lt;br /&gt;package org.driving.school.pages;&lt;br /&gt;&lt;br /&gt;import java.util.Date;&lt;br /&gt;&lt;br /&gt;import org.apache.tapestry5.PersistenceConstants;&lt;br /&gt;import org.apache.tapestry5.annotations.Persist;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * Start page of application school.&lt;br /&gt; */&lt;br /&gt;public class Index {&lt;br /&gt; public Date getCurrentTime() {&lt;br /&gt;  return new Date();&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public String getMyDemoMessage() {&lt;br /&gt;  return "My Demo Message Changed";&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; /*&lt;br /&gt; Component that triggers an action on the server with a subsequent full page refresh.&lt;br /&gt;&lt;br /&gt; Put this into the Index.tml&lt;br /&gt;&lt;br /&gt; &amp;lt;a t:type=&amp;quot;actionlink&amp;quot; t:id=&amp;quot;myAction&amp;quot; t:context=&amp;quot;literal:FooBar&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;My ActionLink&amp;lt;/a&amp;gt; &lt;br /&gt; &amp;lt;div&amp;gt;${myMessageAfterPressingTheActionLink}&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt; See http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/ActionLink.html&lt;br /&gt; for a full component description.&lt;br /&gt;  */&lt;br /&gt;&lt;br /&gt; // Only keep the message until it has been displayed once. You must persist it&lt;br /&gt; // because ActionLink performs redirect after post. If you click refresh browser&lt;br /&gt; // button the message is lost, because it is persisted just for one request.&lt;br /&gt; @Persist(PersistenceConstants.FLASH)&lt;br /&gt; private String myMessageAfterPressingTheActionLink;&lt;br /&gt;&lt;br /&gt; void onActionFromMyAction(String contextParameter) {&lt;br /&gt;  myMessageAfterPressingTheActionLink = "You pressed an action link which had a literal string "&lt;br /&gt;    + contextParameter + " in its context.";&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public String getMyMessageAfterPressingTheActionLink() {&lt;br /&gt;  return myMessageAfterPressingTheActionLink;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The inserted code is more like a cheat sheet  as it tells you what to insert in the appropriate template file to have a working example of the ActionLink component. It also gives a tip on why the field must be persisted.&lt;br /&gt;&lt;br /&gt;All the templates also import the necessary classes from the framework, so you don’t even have to bother pressing Ctrl+Shift+O (Organize Imports).&lt;br /&gt;&lt;br /&gt;Now, delete the code which has been inserted and try the second template (t5-addScriptLink).&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: java"&gt;&lt;br /&gt;/*&lt;br /&gt;The method addScriptLink adds a link to a script file, a JavaScript&lt;br /&gt;library. A component can inject such a script and pass one or more of&lt;br /&gt;assets to this method. Tapestry will ensure that the necessary &amp;lt;link&amp;gt;&lt;br /&gt;elements are added to the top of the document (just inside the&lt;br /&gt;element). The same can be achieved with the annotation&lt;br /&gt;&lt;br /&gt;@IncludeJavaScriptLibrary("${tapestry.scriptaculous}/dragdrop.js")&lt;br /&gt;on a page (Index) class.&lt;br /&gt;*/&lt;br /&gt;@Inject&lt;br /&gt;@Path("${tapestry.scriptaculous}/dragdrop.js")&lt;br /&gt;private Asset dragDropLibrary;&lt;br /&gt;&lt;br /&gt;@Environmental&lt;br /&gt;private RenderSupport renderSupport;&lt;br /&gt;&lt;br /&gt;void setupRender() {&lt;br /&gt; renderSupport.addScriptLink(dragDropLibrary);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;One can now quickly modify the name of the JavaScript library that is to be added on this page. It also includes an alternative way of doing the same thing.&lt;br /&gt;&lt;br /&gt;The third template is a real beast. It includes the code and instructions to have a working autocomplete example in minutes. Show this to your boss to demonstrate how quickly you can have this done in Tapestry 5. :-)&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: java"&gt;&lt;br /&gt;/*&lt;br /&gt;The Autocomplete mixin exists to allow a text field to query the server for completions &lt;br /&gt;for a partially entered phrase. It is often used in situations where the field exists to &lt;br /&gt;select a single value from a large set, too large to succesfully download to the client &lt;br /&gt;as a drop down list; for example, when the number of values to select from is numbered &lt;br /&gt;in the thousands.&lt;br /&gt;&lt;br /&gt;Autocomplete can be added to Index.tml with:&lt;br /&gt;&lt;br /&gt;&amp;lt;form t:type=&amp;quot;form&amp;quot;&amp;gt;    &lt;br /&gt; &amp;lt;input t:id=&amp;quot;cityName&amp;quot; t:type=&amp;quot;TextField&amp;quot; t:mixins=&amp;quot;autocomplete&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt;Create a service interface:&lt;br /&gt;&lt;br /&gt;public interface CityNames {&lt;br /&gt; List&amp;lt;String&amp;gt; getAll();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;And the implementation:&lt;br /&gt;&lt;br /&gt;public class CityNamesImpl implements CityNames {&lt;br /&gt; private List&amp;lt;String&amp;gt; cityNames = new ArrayList&amp;lt;String&amp;gt;();&lt;br /&gt;&lt;br /&gt; public CityNamesImpl() {&lt;br /&gt;  // top 7 cities by population&lt;br /&gt;  cityNames.add("Mumbai");&lt;br /&gt;  cityNames.add("Shanghai");&lt;br /&gt;  cityNames.add("Karachi");&lt;br /&gt;  cityNames.add("Istanbul");&lt;br /&gt;  cityNames.add("Delhi");&lt;br /&gt;  cityNames.add("Sao Paulo");&lt;br /&gt;  cityNames.add("Moscow");&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public List&amp;lt;String&amp;gt; getAll() {&lt;br /&gt;  Collections.sort(cityNames);&lt;br /&gt;  return Collections.unmodifiableList(cityNames);&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Then in the AppModule bind the service: &lt;br /&gt;&lt;br /&gt;binder.bind(CityNames.class, CityNamesImpl.class);&lt;br /&gt;&lt;br /&gt;Change the look of the autocomplete menu by overriding CSS classes&lt;br /&gt; DIV.t-autocomplete-menu UL &lt;br /&gt; DIV.t-autocomplete-menu LI &lt;br /&gt; DIV.t-autocomplete-menu LI.selected&lt;br /&gt; */&lt;br /&gt;@Inject&lt;br /&gt;private CityNames cityNames;&lt;br /&gt;&lt;br /&gt;@Property&lt;br /&gt;private String cityName;&lt;br /&gt;&lt;br /&gt;List&amp;lt;String&amp;gt; onProvideCompletionsFromCityName(String partial) {&lt;br /&gt; List&amp;lt;String&amp;gt; matches = new ArrayList&amp;lt;String&amp;gt;();&lt;br /&gt;&lt;br /&gt; for (String cityName : cityNames.getAll()) {&lt;br /&gt;  if (cityName.toLowerCase().startsWith(partial.toLowerCase())) {&lt;br /&gt;   matches.add(cityName);&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; return matches;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And the last one (t5-zone) which demonstrates the usage of AJAX in Tapestry 5.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: java"&gt;&lt;br /&gt;/*&lt;br /&gt;A Zone can be updated via an ActionLink component. ActionLink supports a zone parameter, &lt;br /&gt;which is the id of the Zone's &amp;lt;div&amp;gt;. Clicking such a link will invoke an event handler &lt;br /&gt;method on the server as normal ... except that the return value of the event handler method &lt;br /&gt;is used to send a partial page response to the client, and the content of that response &lt;br /&gt;is used to update the Zone's &amp;lt;div&amp;gt; in place.&lt;br /&gt;&lt;br /&gt;Put this into the Index.tml,&lt;br /&gt;&lt;br /&gt;&amp;lt;t:block t:id=&amp;quot;myBlockToBeUpdated&amp;quot;&amp;gt;&lt;br /&gt; The current time is:  ${time}&lt;br /&gt;&amp;lt;/t:block&amp;gt;&lt;br /&gt;&amp;lt;t:zone t:id=&amp;quot;myZone&amp;quot;&amp;gt;&lt;br /&gt; &amp;lt;t:delegate to=&amp;quot;myBlockToBeUpdated&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;/t:zone&amp;gt;&amp;lt;br/&amp;gt; &lt;br /&gt;&amp;lt;a t:type=&amp;quot;actionlink&amp;quot; t:id=&amp;quot;refreshZone&amp;quot; href=&amp;quot;#&amp;quot; t:zone=&amp;quot;myZone&amp;quot;&amp;gt;Refresh time with AJAX request.&amp;lt;/a&amp;gt;&lt;br /&gt; */&lt;br /&gt;@Inject&lt;br /&gt;@Property&lt;br /&gt;private Block myBlockToBeUpdated;&lt;br /&gt;&lt;br /&gt;Block onActionFromRefreshZone() {&lt;br /&gt; // Return the zone we want rendered.&lt;br /&gt; return myBlockToBeUpdated;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public Date getTime() {&lt;br /&gt; return new Date();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Again, if you follow the comments in the template, you will have a working example in under a minute.&lt;br /&gt;&lt;br /&gt;And this is all about – getting beginners on the track fast! Including me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6420029857026901711-8972513290578543768?l=bbwebcraft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bbwebcraft.blogspot.com/feeds/8972513290578543768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bbwebcraft.blogspot.com/2009/01/task-5-customize-eclipse-for-tapestry-5.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/8972513290578543768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/8972513290578543768'/><link rel='alternate' type='text/html' href='http://bbwebcraft.blogspot.com/2009/01/task-5-customize-eclipse-for-tapestry-5.html' title='Task 5 - Customize Eclipse for Tapestry 5 code editing'/><author><name>Borut Bolčina</name><uri>https://profiles.google.com/100412320755782895986</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-lSS0jJqb0lE/AAAAAAAAAAI/AAAAAAAAAAA/Ilphj3SxrAI/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_dW-BmW1h1P4/SYSS0vjn7hI/AAAAAAAABQ4/axKHrpde9R8/s72-c/task5-01-context-help.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6420029857026901711.post-3898709338614331692</id><published>2009-01-15T19:28:00.002+01:00</published><updated>2009-03-14T22:46:24.040+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='tapestry 5'/><title type='text'>Task 4 – Customize Eclipse for Tapestry 5 template editing</title><content type='html'>As there is no initiative, at least to my knowledge, for &lt;a href="http://tapestry.apache.org/tapestry5/"&gt;Tapestry 5&lt;/a&gt; support in &lt;a class="zem_slink" href="http://www.eclipse.org/" title="Eclipse (software)" rel="homepage"&gt;Eclipse&lt;/a&gt;, we will have to manage with some manual tweaking.&lt;br /&gt;&lt;br /&gt;First bring up a preference dialog (Windows/Preferences). Then type &lt;span style="font-family: courier new;"&gt;cont&lt;/span&gt; in the filter area to narrow down preferences which we are looking for. Click on Content Types under the General node. On the right side of the dialog find Text/&lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/HTML" title="HTML" rel="wikipedia"&gt;HTML&lt;/a&gt; node and select it. All file associations for HTML content type are listed in the area just bellow.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_dW-BmW1h1P4/SW5OWqrtJXI/AAAAAAAABQI/PFWfPy0LLZc/s1600-h/task4-01-preferences-content-type.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 391px;" src="http://4.bp.blogspot.com/_dW-BmW1h1P4/SW5OWqrtJXI/AAAAAAAABQI/PFWfPy0LLZc/s400/task4-01-preferences-content-type.png" alt="" id="BLOGGER_PHOTO_ID_5291252763528602994" border="0"&gt;&lt;/a&gt;We have to add Tapestry’s templates to be associated with HTML content type, so click on Add button and type &lt;span style="font-family: courier new;"&gt;*.tml&lt;/span&gt; in the input field and click OK.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_dW-BmW1h1P4/SW5OlSI22KI/AAAAAAAABQQ/VD8CZr9uAds/s1600-h/task4-02-preferences-content-type-tml.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 214px;" src="http://4.bp.blogspot.com/_dW-BmW1h1P4/SW5OlSI22KI/AAAAAAAABQQ/VD8CZr9uAds/s400/task4-02-preferences-content-type-tml.png" alt="" id="BLOGGER_PHOTO_ID_5291253014638024866" border="0"&gt;&lt;/a&gt;You should see another entry in the File associations list - &lt;span style="font-family: courier new;"&gt;*.tml&lt;/span&gt;. Now confirm the addition by clicking on an OK button.&lt;br /&gt;&lt;br /&gt;From now on a HTML editor which comes with Eclipse WTP is the default editor for tml files. This editor unfortunately does not handle formatting of the source code (&lt;span style="font-family: courier new;"&gt;tml&lt;/span&gt; in our case) very well.&lt;br /&gt;&lt;br /&gt;If you are a one man band and don’t care about indenting the tags by some rules then you can safely skip this screencast bellow.&lt;br /&gt;&lt;br /&gt;For others, who might have questioned themselves if there is a way, I will show you how you can make your templates look better in the editor and most importantly – with fewer conflicts if two or more designers are working repeatedly/in sequence with the same set of templates checked-in in some source control system like &lt;a href="http://subversion.tigris.org/"&gt;subversion&lt;/a&gt; and using the same formatter.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://blip.tv/file/1670264"&gt;&lt;/a&gt;screencast is best viewed in full screen mode.&lt;br /&gt;&lt;embed src="http://blip.tv/play/Aea8TgA" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="800" height="630"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;A link to the plugin &lt;a href="http://eclipsetidy.sourceforge.net/"&gt;http://eclipsetidy.sourceforge.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Below are the tags that I was talking about in the screencast that should be copied into the Eclipse Tidy preferences. It is just a quick first proposition – like monkey sort (not at all tested)&lt;br /&gt;&lt;br /&gt;inline tags:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;t:actionlink, t:addrowlink, t:ajaxformloop, t:any, t:checkbox, t:datefield, t:delegate, t:eventlink, t:gridcell, t:label, t:output, t:passwordfield, t:outputraw, t:removerowlink&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;block level tags:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;t:beandisplay, t:beaneditform, t:beaneditor, t:errors, t:exceptiondisplay, t:form, t:formfragment, t:forminjector, t:grid, t:gridcolumns, t:gridpager, t:gridrows, t:if, t:linksubmit, t:loop, t:pagelink, t:palette, t:propertydisplay, t:propertyeditor, t:radio, t:radiogroup, t:renderobject, t:select, t:submit, t:submitnotifier, t:textarea, t:textfield, t:textoutput, t:unless, t:zone&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I was also talking about &lt;a class="zem_slink" href="http://en.wikipedia.org/wiki/Document_Type_Declaration" title="Document Type Declaration" rel="wikipedia"&gt;DOCTYPE&lt;/a&gt;. If you want to know more go here (&lt;a href="http://www.w3.org/QA/Tips/Doctype"&gt;http://www.w3.org/QA/Tips/Doctype&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;In the screencast I made a template. Here it is for you to copy/paste if you want:&lt;br /&gt;&lt;pre class="brush: xml"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" ?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"&lt;br /&gt;    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&amp;gt;&lt;br /&gt;&amp;lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"&amp;gt;&lt;br /&gt;  &amp;lt;head&amp;gt;&lt;br /&gt;    &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&amp;gt;&lt;br /&gt;    &amp;lt;title&amp;gt;&lt;br /&gt;      Insert title here&lt;br /&gt;    &amp;lt;/title&amp;gt;&lt;br /&gt;    &amp;lt;link rel="stylesheet" type="text/css" href="${asset:context:css/MY-STYLESHEET.css}" /&amp;gt;&lt;br /&gt;  &amp;lt;/head&amp;gt;&lt;br /&gt;  &amp;lt;body&amp;gt;&lt;br /&gt;  &lt;br /&gt;  &amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If you look at the source code in the browser of the school application (&lt;span style="font-family: courier new;"&gt;Index&lt;/span&gt; page), &lt;a class="zem_slink" href="http://www.firefox.com/" title="Mozilla Firefox" rel="homepage"&gt;Firefox&lt;/a&gt; 3 shows:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_dW-BmW1h1P4/SW5Qu6MQUbI/AAAAAAAABQY/aPNl1HU_cvs/s1600-h/task4-04-source-firefox3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 310px;" src="http://4.bp.blogspot.com/_dW-BmW1h1P4/SW5Qu6MQUbI/AAAAAAAABQY/aPNl1HU_cvs/s400/task4-04-source-firefox3.png" alt="" id="BLOGGER_PHOTO_ID_5291255379031773618" border="0"&gt;&lt;/a&gt;&lt;br /&gt;We can modify &lt;span style="font-family: courier new;"&gt;AppModule.java&lt;/span&gt; (method &lt;span style="font-family: courier new;"&gt;contributeApplicationDefaults&lt;/span&gt;) in a way to tell Tapestry not to compress white spaces,&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: java"&gt;configuration.add(SymbolConstants.COMPRESS_WHITESPACE, "false");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;so the output is more readable:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_dW-BmW1h1P4/SW5Q6V6QEwI/AAAAAAAABQg/q1vC-A_09w8/s1600-h/task4-05-source-firefox3-uncompressed.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 315px;" src="http://2.bp.blogspot.com/_dW-BmW1h1P4/SW5Q6V6QEwI/AAAAAAAABQg/q1vC-A_09w8/s400/task4-05-source-firefox3-uncompressed.png" alt="" id="BLOGGER_PHOTO_ID_5291255575451013890" border="0"&gt;&lt;/a&gt;It is not perfect, but good enough to eye scan the sources.&lt;br /&gt;&lt;br /&gt;One more quick tip. Maybe you have noticed, you have to press F5 (refresh) on a running project (jetty:run) for some changes you have made to take effect. There is an option in the Preferences which can save you from pressing the button again and again.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_dW-BmW1h1P4/SW5RQQz3NqI/AAAAAAAABQo/qAWGLm2Ifn4/s1600-h/task4-03-preferences-refresh-automatically.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 302px;" src="http://1.bp.blogspot.com/_dW-BmW1h1P4/SW5RQQz3NqI/AAAAAAAABQo/qAWGLm2Ifn4/s400/task4-03-preferences-refresh-automatically.png" alt="" id="BLOGGER_PHOTO_ID_5291255952039163554" border="0"&gt;&lt;/a&gt;Next time we will learn how to create java code templates to speed up Tapestry 5 web application development.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/eaa56b9c-2b21-4c19-8c64-2ee1ea0c97bb/" title="Zemified by Zemanta"&gt;&lt;img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=eaa56b9c-2b21-4c19-8c64-2ee1ea0c97bb" alt="Reblog this post [with Zemanta]"&gt;&lt;/a&gt;&lt;span class="zem-script more-related"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6420029857026901711-3898709338614331692?l=bbwebcraft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bbwebcraft.blogspot.com/feeds/3898709338614331692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bbwebcraft.blogspot.com/2009/01/task-4-customize-eclipse-for-tapestry-5.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/3898709338614331692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/3898709338614331692'/><link rel='alternate' type='text/html' href='http://bbwebcraft.blogspot.com/2009/01/task-4-customize-eclipse-for-tapestry-5.html' title='Task 4 – Customize Eclipse for Tapestry 5 template editing'/><author><name>Borut Bolčina</name><uri>https://profiles.google.com/100412320755782895986</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-lSS0jJqb0lE/AAAAAAAAAAI/AAAAAAAAAAA/Ilphj3SxrAI/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_dW-BmW1h1P4/SW5OWqrtJXI/AAAAAAAABQI/PFWfPy0LLZc/s72-c/task4-01-preferences-content-type.png' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6420029857026901711.post-8585966995340434573</id><published>2009-01-04T22:12:00.023+01:00</published><updated>2009-03-14T22:49:34.854+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='jetty'/><category scheme='http://www.blogger.com/atom/ns#' term='tapestry 5'/><title type='text'>Task 3 - Rapid turnaround in Tapestry 5</title><content type='html'>The goal of this task is to learn how &lt;a href="http://tapestry.apache.org/" title="Tapestry (programming)" rel="homepage" class="zem_slink"&gt;Tapestry&lt;/a&gt; can boost your productivity by allowing you to modify (some) files and see the changes immediately. This does not mean we will be learning how to configure the servlet container of your choice to reload the context when some files were changed. Oh no, I will be talking and demonstrating &lt;a href="http://tapestry.apache.org/tapestry5/guide/reload.html"&gt;live class reloading&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I will continue to work on a web application from &lt;a href="http://bbwebcraft.blogspot.com/2008/12/task-1-create-skeleton-tapestry-5.html"&gt;Task 1&lt;/a&gt;. Seeing is believing, so click on a play button of the screencast below to witness live class reloading in action.&lt;br /&gt;&lt;br /&gt;&lt;embed src="http://blip.tv/play/Aea3ewA" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="800" height="630"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blip.tv/file/1669669"&gt;Alternate location&lt;/a&gt; to view this screencast.&lt;br /&gt;&lt;br /&gt;If you have already read the documentation at the official site, you probably know that you cannot change just any class and expect to be reloaded by the framework. A change to any loaded class inside the controlled package is noticed by the framework and acted appropriately upon. In case of our demo application the controlled packages are:&lt;br /&gt;&lt;ul&gt;&lt;li style="font-family: courier new;"&gt;org.driving.school.pages&lt;/li&gt;&lt;li style="font-family: courier new;"&gt;org.driving.school.components&lt;/li&gt;&lt;li style="font-family: courier new;"&gt;org.driving.school.mixins&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: courier new;"&gt;org.driving.school.base&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;We will be experimenting and exploring live class &amp;amp; template reloading in tasks to come.&lt;br /&gt;&lt;br /&gt;As I “promised” in previous post I will tell you how to prepare your development environment to pick up changes in any CSS files your application will have. How can I be writing about something so basic after you have just watched a state of the art framework capability to pick up changes in class files? Well, if you are developing in Windows and using  &lt;a href="http://jetty.mortbay.com/" title="Jetty (web server)" rel="homepage" class="zem_slink"&gt;Jetty&lt;/a&gt; as your servlet container, then you will probably spend some time googling  for a solution. I was.&lt;br /&gt;&lt;br /&gt;But first let’s show the problem. In Eclipse (on Windows) open our school project. Add a css folder under &lt;span style="font-family: courier new;"&gt;src/main/webapp&lt;/span&gt; and create a new file &lt;span style="font-family: courier new;"&gt;school.css&lt;/span&gt; inside.&lt;br /&gt;&lt;pre class="brush: css"&gt;body {&lt;br /&gt;   color: red;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then, modify Index.tml to include a reference  to this CSS file. The head section should look like&lt;br /&gt;&lt;pre class="brush: xml"&gt;&amp;lt;head&amp;gt;&lt;br /&gt;   &amp;lt;title&amp;gt;school Start Page&amp;lt;/title&amp;gt;&lt;br /&gt;   &amp;lt;link rel="stylesheet" type="text/css" href="${asset:context:css/school.css}" /&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now start the web app if it was not already started. You should see&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_dW-BmW1h1P4/SWFTnNDRYII/AAAAAAAABPg/VVOeErLu0Gs/s1600-h/task3-01-red-startpage.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 212px;" src="http://1.bp.blogspot.com/_dW-BmW1h1P4/SWFTnNDRYII/AAAAAAAABPg/VVOeErLu0Gs/s400/task3-01-red-startpage.png" alt="" id="BLOGGER_PHOTO_ID_5287599370493059202" border="0"&gt;&lt;/a&gt;&lt;br /&gt;That is ok, red color as expected. Now change the color to black for instance in &lt;span style="font-family: courier new;"&gt;school.css&lt;/span&gt; in Eclipse while the web app is still running and save the changes. You will get&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_dW-BmW1h1P4/SWFT2GQz5XI/AAAAAAAABPo/HKQw8w7z08c/s1600-h/task3-02-save-problems.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 166px;" src="http://3.bp.blogspot.com/_dW-BmW1h1P4/SWFT2GQz5XI/AAAAAAAABPo/HKQw8w7z08c/s400/task3-02-save-problems.png" alt="" id="BLOGGER_PHOTO_ID_5287599626368836978" border="0"&gt;&lt;/a&gt;&lt;br /&gt;Now go googling. Just kidding, read on.&lt;br /&gt;&lt;br /&gt;Stop web app by clicking on a red square in the Console view.&lt;br /&gt;&lt;br /&gt;You have to get a copy of &lt;span style="font-family: courier new;"&gt;webdefault.xml&lt;/span&gt; file. Where? The safest way is to extract it from the jetty jar you are running your application with.  If you look at the &lt;span style="font-family: courier new;"&gt;pom.xml&lt;/span&gt; file of the school application you will see a maven-jetty-plugin&lt;br /&gt;&lt;pre class="brush: xml"&gt;&amp;lt;!-- Run the application using "mvn jetty:run" --&amp;gt;&lt;br /&gt;&amp;lt;plugin&amp;gt;&lt;br /&gt;   &amp;lt;groupId&amp;gt;org.mortbay.jetty&amp;lt;/groupId&amp;gt;&lt;br /&gt;   &amp;lt;artifactId&amp;gt;maven-jetty-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;   &amp;lt;version&amp;gt;6.1.9&amp;lt;/version&amp;gt;&lt;br /&gt;   &amp;lt;configuration&amp;gt;&lt;br /&gt;       &amp;lt;!-- Log to the console. --&amp;gt;&lt;br /&gt;       &amp;lt;requestLog implementation="org.mortbay.jetty.NCSARequestLog"&amp;gt;&lt;br /&gt;           &amp;lt;!-- This doesn't do anything for Jetty, but is a workaround for a Maven bug&lt;br /&gt;               that prevents the requestLog from being set. --&amp;gt;&lt;br /&gt;           &amp;lt;append&amp;gt;true&amp;lt;/append&amp;gt;&lt;br /&gt;       &amp;lt;/requestLog&amp;gt;&lt;br /&gt;   &amp;lt;/configuration&amp;gt;&lt;br /&gt;&amp;lt;/plugin&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Notice the version 6.1.9. Navigate to &lt;span style="font-family: courier new;"&gt;%HOMEPATH%/.m2/repository/org/mortbay/jetty/jetty/6.1.9&lt;/span&gt;. Open &lt;span style="font-family: courier new;"&gt;jetty-6.1.9.jar&lt;/span&gt; and extract &lt;span style="font-family: courier new;"&gt;webdefault.xml&lt;/span&gt; file to &lt;span style="font-family: courier new;"&gt;src/main/resources/org/mortbay/jetty/webapp/&lt;/span&gt; of the school project. Open this file in Eclipse and locate the section&lt;br /&gt;&lt;pre class="brush: xml"&gt;&amp;lt;init-param&amp;gt;&lt;br /&gt;   &amp;lt;param-name&amp;gt;useFileMappedBuffer&amp;lt;/param-name&amp;gt;&lt;br /&gt;   &amp;lt;param-value&amp;gt;true&amp;lt;/param-value&amp;gt;&lt;br /&gt;&amp;lt;/init-param&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Change the value to &lt;span style="font-family: courier new;"&gt;false&lt;/span&gt;.&lt;br /&gt;Modify &lt;span style="font-family: courier new;"&gt;pom.xml&lt;/span&gt; to look like&lt;br /&gt;&lt;pre class="brush: xml"&gt;&amp;lt;plugin&amp;gt;&lt;br /&gt;   &amp;lt;groupId&amp;gt;org.mortbay.jetty&amp;lt;/groupId&amp;gt;&lt;br /&gt;   &amp;lt;artifactId&amp;gt;maven-jetty-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;   &amp;lt;version&amp;gt;6.1.9&amp;lt;/version&amp;gt;&lt;br /&gt;   &amp;lt;configuration&amp;gt;&lt;br /&gt;       &amp;lt;webAppConfig&amp;gt;&lt;br /&gt;           &amp;lt;defaultsDescriptor&amp;gt;src/main/resources/org/mortbay/jetty/webapp/webdefault.xml&amp;lt;/defaultsDescriptor&amp;gt;&lt;br /&gt;       &amp;lt;/webAppConfig&amp;gt;&lt;br /&gt;       &amp;lt;requestLog implementation="org.mortbay.jetty.NCSARequestLog"&amp;gt;&lt;br /&gt;           &amp;lt;filename&amp;gt;target/yyyy_mm_dd.request.log&amp;lt;/filename&amp;gt;&lt;br /&gt;           &amp;lt;append&amp;gt;true&amp;lt;/append&amp;gt;&lt;br /&gt;       &amp;lt;/requestLog&amp;gt;&lt;br /&gt;   &amp;lt;/configuration&amp;gt;&lt;br /&gt;&amp;lt;/plugin&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The important part is &lt;defaultsdescriptor&gt; which tells Jetty where to locate our modified &lt;span style="font-family: courier new;"&gt;webdefault.xml&lt;/span&gt; file. The need for this change we have made is described at &lt;a href="http://docs.codehaus.org/display/JETTY/Files+locked+on+Windows"&gt;http://docs.codehaus.org/display/JETTY/Files+locked+on+Windows&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Start the school web app. You will most likely get an error:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;[INFO] Starting jetty 6.1.9 ...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;2009-01-05 00:40:28.779::INFO:  jetty-6.1.9&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;2009-01-05 00:40:28.789::WARN:  failed ContextHandlerCollection@1e903d5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;java.lang.IllegalArgumentException: Illegal context spec:null&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;WTF?&lt;br /&gt;&lt;br /&gt;Change the version of the plugin to&lt;br /&gt;&lt;pre class="brush: xml"&gt;&amp;lt;version&amp;gt;6.1.14&amp;lt;/version&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Start the school web app again. Jetty started! If not, write a dirty comment on this blog.&lt;br /&gt;&lt;br /&gt;What a detour. Do you still remember what we are trying to do? Type http://localhost:8080/school in the browser. Do you see the text in the color you have specified in the CSS file? Now change the color, save the &lt;span style="font-family: courier new;"&gt;school.css&lt;/span&gt; (you should not get an error dialog this time) and refresh the browser. Finally.&lt;/defaultsdescriptor&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/d43cd1d6-1548-4d9a-9cc8-79219f7d2195/" title="Zemified by Zemanta"&gt;&lt;img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=d43cd1d6-1548-4d9a-9cc8-79219f7d2195" alt="Reblog this post [with Zemanta]"&gt;&lt;/a&gt;&lt;span class="zem-script more-related"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6420029857026901711-8585966995340434573?l=bbwebcraft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bbwebcraft.blogspot.com/feeds/8585966995340434573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bbwebcraft.blogspot.com/2009/01/task-3-rapid-turnaround-in-tapestry-5.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/8585966995340434573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/8585966995340434573'/><link rel='alternate' type='text/html' href='http://bbwebcraft.blogspot.com/2009/01/task-3-rapid-turnaround-in-tapestry-5.html' title='Task 3 - Rapid turnaround in Tapestry 5'/><author><name>Borut Bolčina</name><uri>https://profiles.google.com/100412320755782895986</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-lSS0jJqb0lE/AAAAAAAAAAI/AAAAAAAAAAA/Ilphj3SxrAI/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_dW-BmW1h1P4/SWFTnNDRYII/AAAAAAAABPg/VVOeErLu0Gs/s72-c/task3-01-red-startpage.png' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6420029857026901711.post-3329623007547967778</id><published>2008-12-20T18:55:00.001+01:00</published><updated>2009-03-14T22:51:46.131+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Web application'/><category scheme='http://www.blogger.com/atom/ns#' term='tapestry 5'/><title type='text'>Task 2 – Explore the Tapestry 5 project structure and learn where to put your stuff</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_dW-BmW1h1P4/SU0zi16OgWI/AAAAAAAABPE/xlrK_Anx7hY/s1600-h/task2-01-explorer.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 155px; height: 400px;" src="http://1.bp.blogspot.com/_dW-BmW1h1P4/SU0zi16OgWI/AAAAAAAABPE/xlrK_Anx7hY/s400/task2-01-explorer.png" alt="" id="BLOGGER_PHOTO_ID_5281934611655328098" border="0"&gt;&lt;/a&gt;This post is a continuation of the previous one.&lt;br /&gt;&lt;br /&gt;Let’s expand all the nodes of the project in the Package Explorer.&lt;br /&gt;&lt;br /&gt;If you have never seen a project structure for a &lt;a href="http://en.wikipedia.org/wiki/Web_application" title="Web application" rel="wikipedia" class="zem_slink"&gt;web application&lt;/a&gt; by &lt;a href="http://maven.apache.org/" title="Apache Maven" rel="homepage" class="zem_slink"&gt;Maven&lt;/a&gt; convention – this is it. Well, with &lt;a href="http://tapestry.apache.org/" title="Tapestry (programming)" rel="homepage" class="zem_slink"&gt;Tapestry&lt;/a&gt; flavor.  This “tree of files” is created by tapestry quickstart archetype.&lt;br /&gt;&lt;br /&gt;Two sentences of theory before continuing.&lt;br /&gt;&lt;br /&gt;It is WHERE the files END UP in the WAR that matters, not where they are in your development environment. The IDE and tools that you use should maximize the productivity and harness the power that is provided by Tapestry framework.&lt;br /&gt;&lt;br /&gt;I will continue to describe &lt;span style="font-weight: bold;"&gt;one project layout with one set of tools&lt;/span&gt; in this post. I want to describe things simple. I will rather create another post for different set of tools and/or personal preferences of where things (files) can be.&lt;br /&gt;&lt;br /&gt;The tools of choice are: Eclipse (3.4.0), Maven (2.0.9) and &lt;a href="http://m2eclipse.codehaus.org/"&gt;m2eclipse&lt;/a&gt; plugin (0.9.6).&lt;br /&gt;&lt;br /&gt;As we are not starting from scratch – the archetype did the initial work for us – let’s have a look at the existing directories and files from top to bottom.&lt;br /&gt;&lt;br /&gt;There are two java files in two different packages: &lt;span style="font-family: courier new;"&gt;Index.java&lt;/span&gt; and &lt;span style="font-family: courier new;"&gt;AppModule.java&lt;/span&gt;. The &lt;span style="font-family: courier new;"&gt;Index.java&lt;/span&gt; resides in the &lt;span style="font-family: courier new;"&gt;org.driving.school.pages&lt;/span&gt; package and it is in this package that you will add java sources for additional pages you will create. The &lt;span style="font-family: courier new;"&gt;AppModule.java&lt;/span&gt; is a &lt;a href="http://tapestry.apache.org/tapestry5/tapestry-ioc/"&gt;Tapestry Inversion of Control&lt;/a&gt; Module. This is your application’s module builder class. In other words – it is where you will do most of the configuration.&lt;br /&gt;&lt;br /&gt;The accompanying template file to the Index.java controller class is &lt;span style="font-family: courier new;"&gt;Index.tml&lt;/span&gt;.  In the above figure it is located in the &lt;span style="font-family: courier new;"&gt;src/main/webapp/&lt;/span&gt; directory. This file can also reside in &lt;span style="font-family: courier new;"&gt;src/main/resources/org/driving/school/pages&lt;/span&gt; directory. It is of personal/team CHOICE where the template files are located.&lt;br /&gt;&lt;br /&gt;So, what else goes to &lt;span style="font-family: courier new;"&gt;src/main/resources&lt;/span&gt;? As you can observe from the figure above, the &lt;span style="font-family: courier new;"&gt;log4j.properties&lt;/span&gt; file is one of them. Why? Because when packaged, it ends up in the &lt;span style="font-family: courier new;"&gt;WEB-INF/classes&lt;/span&gt;, which means on the classpath. &lt;a href="http://tapestry.apache.org/tapestry5/guide/localization.html"&gt;Message catalogs&lt;/a&gt; (.properties) also belong here.&lt;br /&gt;&lt;br /&gt;You can imagine what goes to &lt;span style="font-family: courier new;"&gt;src/test/java&lt;/span&gt; and &lt;span style="font-family: courier new;"&gt;src/test/resources&lt;/span&gt;. I will not go into details here because this is not a crash course in &lt;a href="http://www.amazon.com/exec/obidos/ASIN/1932394850/ref=nosim/blogzilla-20"&gt;Test Driven Development&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Next, there are two libraries: &lt;a href="http://en.wikipedia.org/wiki/Java_Virtual_Machine" title="Java Virtual Machine" rel="wikipedia" class="zem_slink"&gt;JRE&lt;/a&gt; System Library and Maven Dependencies. The latter includes all the jars needed by the project. Only two of them are really referenced in the project’s POM: tapestry-core and &lt;a href="http://www.amazon.com/exec/obidos/ASIN/0321503104/ref=nosim/blogzilla-20"&gt;testng&lt;/a&gt;. The others are so called transitive dependencies (dependencies of dependencies). Maven takes care of downloading and including them in the classpath.&lt;br /&gt;&lt;br /&gt;We will skip &lt;span style="font-family: courier new;"&gt;src/main/webapp/META-INF/&lt;/span&gt;&lt;a style="font-family: courier new;" href="http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.html"&gt;MANIFEST.MF&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;And then there is &lt;span style="font-family: courier new;"&gt;app.properties&lt;/span&gt; file under &lt;span style="font-family: courier new;"&gt;src/main/webapp/WEB-INF&lt;/span&gt;. This is a global message catalog. It will include a default language messages. They are called messages because you will be accessing them through the message prefix, but we will not discuss that now. If your application will be multilingual then you would create a file, for example, &lt;span style="font-family: courier new;"&gt;app_sl_SI.properties&lt;/span&gt; which would include &lt;a href="http://www.slovenia.info/"&gt;Slovenian&lt;/a&gt; messages (translations).&lt;br /&gt;&lt;br /&gt;Next, the only XML file you will need to have in your application – &lt;span style="font-family: courier new;"&gt;web.xml&lt;/span&gt;.&lt;br /&gt;&lt;pre class="brush: xml"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE web-app&lt;br /&gt;   PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"&lt;br /&gt;   "http://java.sun.com/dtd/web-app_2_3.dtd"&amp;gt;&lt;br /&gt;&amp;lt;web-app&amp;gt;&lt;br /&gt;&amp;lt;display-name&amp;gt;school Tapestry 5 Application&amp;lt;/display-name&amp;gt;&lt;br /&gt;&amp;lt;context-param&amp;gt;&lt;br /&gt;   &amp;lt;param-name&amp;gt;tapestry.app-package&amp;lt;/param-name&amp;gt;&lt;br /&gt;   &amp;lt;param-value&amp;gt;org.driving.school&amp;lt;/param-value&amp;gt;&lt;br /&gt;&amp;lt;/context-param&amp;gt;&lt;br /&gt;&amp;lt;filter&amp;gt;&lt;br /&gt;   &amp;lt;filter-name&amp;gt;app&amp;lt;/filter-name&amp;gt;&lt;br /&gt;   &amp;lt;filter-class&amp;gt;org.apache.tapestry5.TapestryFilter&amp;lt;/filter-class&amp;gt;&lt;br /&gt;&amp;lt;/filter&amp;gt;&lt;br /&gt;&amp;lt;filter-mapping&amp;gt;&lt;br /&gt;   &amp;lt;filter-name&amp;gt;app&amp;lt;/filter-name&amp;gt;&lt;br /&gt;   &amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;&amp;lt;/filter-mapping&amp;gt;&lt;br /&gt;&amp;lt;/web-app&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;There is one context parameter. It has a value of &lt;span style="font-family: courier new;"&gt;org.driving.school&lt;/span&gt;. This tells Tapestry where to look for pages and components. That is why you have a package named &lt;span style="font-family: courier new;"&gt;org.driving.school.pages&lt;/span&gt; under &lt;span style="font-family: courier new;"&gt;src/main/java&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;You can also see there is a filter named app which is implemented by TapestryFilter class. Every request that comes to application’s context (in our case &lt;span style="font-family: courier new;"&gt;http://localhost:8080/school&lt;/span&gt;) is processed by &lt;span style="font-family: courier new;"&gt;TapestryFilter&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Favicon" title="Favicon" rel="wikipedia" class="zem_slink"&gt;Favicon.ico&lt;/a&gt; is a file which I think everyone knows what it is, so we will skip it.&lt;br /&gt;&lt;br /&gt;Now the template file for the page – &lt;span style="font-family: courier new;"&gt;Index.tml&lt;/span&gt;.  I have already mentioned it above. This is a &lt;a href="http://en.wikipedia.org/wiki/XHTML" title="XHTML" rel="wikipedia" class="zem_slink"&gt;XHTML&lt;/a&gt; file which includes elements in Tapestry namespace&lt;br /&gt;&lt;pre name="code" class="xml"&gt;xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;like&lt;br /&gt;&lt;pre class="brush: xml"&gt;&amp;lt;t:pagelink page="Index"&amp;gt;refresh&amp;lt;/t:pagelink&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The tml files are the View part of your app and those files will be the only ones developers will meet the designers. With very little practice no one will ruin the work of the other one. There is of course a lot more to tell for the templates, but as this blog is about hands-on approach to building web apps, I have to be short in words and more expressive in examples and real world cases.&lt;br /&gt;&lt;br /&gt;One file remains – &lt;a href="http://maven.apache.org/guides/introduction/introduction-to-the-pom.html"&gt;&lt;span style="font-family: courier new;"&gt;pom.xml&lt;/span&gt;&lt;/a&gt;. This is a Maven thing. It manages our project. It is here where you configure what java libraries do we need, and what version of the compiler to use, and what should be the name of the WAR (hence context name) etc.&lt;br /&gt;&lt;br /&gt;It includes a jetty plugin which enables us to run the web app with &lt;span style="font-family: courier new;"&gt;mvn jetty:run&lt;/span&gt;, but unfortunately Windows users will have to do a bit more to achieve that changing something in the &lt;a href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets" title="Cascading Style Sheets" rel="wikipedia" class="zem_slink"&gt;CSS&lt;/a&gt; will be visible in the browser without restarting the &lt;a href="http://jetty.mortbay.com/" title="Jetty (web server)" rel="homepage" class="zem_slink"&gt;Jetty&lt;/a&gt; container. Yes, something as basic as that and it does not work out of the box by pressing F5 (refresh) in the browser. I was quite disappointed until I dug the solution on the net. I will write about this in the next post.&lt;br /&gt;&lt;br /&gt;The quickstart &lt;a href="http://maven.apache.org/guides/introduction/introduction-to-archetypes.html"&gt;archetype&lt;/a&gt; is really just that – quick. It does not demonstrate the users (developers) where components are, where images and css files should be, how pages can be grouped in subfolders/subpackages and a lot of other concepts. Of course this is all explained at official site, but in many cases in a technical lingo which does not suit everyone well, especially newbies. Several more archetypes should be created and made available to public via &lt;a href="http://maven.apache.org/guides/introduction/introduction-to-repositories.html"&gt;Maven repositories&lt;/a&gt; which would demonstrate and kick start a new project with some additional concepts.&lt;br /&gt;&lt;br /&gt;So, to achieve the Task 2 I have to explain where to put your components. The java files for this project would go under &lt;span style="font-family: courier new;"&gt;src/main/java/org/driving/school/components&lt;/span&gt; and the resources (templates, message catalogs, javascript) under &lt;span style="font-family: courier new;"&gt;src/main/resources/org/driving/school/components&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Put your images in the &lt;span style="font-family: courier new;"&gt;src/main/webapp/images&lt;/span&gt; (or &lt;span style="font-family: courier new;"&gt;img&lt;/span&gt; or similar) and CSS files as a sibling to images (&lt;span style="font-family: courier new;"&gt;src/main/webapp/css&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;This post ends here. It does not provide much value as we have only walked through the files of the quickstart project template, but it pointed out to some weak points which will all be addressed in the next posts. The goal is to remove the pit holes some of us have fallen into when started to use Tapestry 5.&lt;br /&gt;&lt;br /&gt;     &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/dfca5f56-c02f-46d0-b5d8-1b5a0b70ddbc/" title="Zemified by Zemanta"&gt;&lt;img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=dfca5f56-c02f-46d0-b5d8-1b5a0b70ddbc" alt="Reblog this post [with Zemanta]"&gt;&lt;/a&gt;&lt;span class="zem-script more-related"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6420029857026901711-3329623007547967778?l=bbwebcraft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bbwebcraft.blogspot.com/feeds/3329623007547967778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bbwebcraft.blogspot.com/2008/12/task-2-explore-tapestry-5-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/3329623007547967778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/3329623007547967778'/><link rel='alternate' type='text/html' href='http://bbwebcraft.blogspot.com/2008/12/task-2-explore-tapestry-5-project.html' title='Task 2 – Explore the Tapestry 5 project structure and learn where to put your stuff'/><author><name>Borut Bolčina</name><uri>https://profiles.google.com/100412320755782895986</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-lSS0jJqb0lE/AAAAAAAAAAI/AAAAAAAAAAA/Ilphj3SxrAI/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_dW-BmW1h1P4/SU0zi16OgWI/AAAAAAAABPE/xlrK_Anx7hY/s72-c/task2-01-explorer.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6420029857026901711.post-8315371770360096726</id><published>2008-12-17T21:41:00.001+01:00</published><updated>2009-01-05T01:38:18.358+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='tapestry 5'/><title type='text'>Task 1 - Create a skeleton Tapestry 5 project and run it.</title><content type='html'>Fire up &lt;a href="http://www.eclipse.org/" title="Eclipse (software)" rel="homepage" class="zem_slink"&gt;Eclipse&lt;/a&gt; Ganymede and choose Java perspective. Make sure the eclipse is started up with &lt;a href="http://en.wikipedia.org/wiki/Java_Development_Kit" title="Java Development Kit" rel="wikipedia" class="zem_slink"&gt;JDK&lt;/a&gt; not &lt;a href="http://en.wikipedia.org/wiki/Java_Virtual_Machine" title="Java Virtual Machine" rel="wikipedia" class="zem_slink"&gt;JRE&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Select File/New/Other… from the Eclipse menu. In the dialog type maven in the Wizard's input field to reduce the number of wizards in the list. Select Maven Project.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_dW-BmW1h1P4/SUllOnALbVI/AAAAAAAABMs/MrIl3EViuCo/s1600-h/task1-01-select-a-wizard.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 330px;" src="http://1.bp.blogspot.com/_dW-BmW1h1P4/SUllOnALbVI/AAAAAAAABMs/MrIl3EViuCo/s400/task1-01-select-a-wizard.png" alt="" id="BLOGGER_PHOTO_ID_5280863339730922834" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In the New Maven Project dialog that appears next just click Next. Don’t get distracted by other options for now.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_dW-BmW1h1P4/SUllfQdpxuI/AAAAAAAABM0/uPkhVr4COj0/s1600-h/task1-02-new-maven-project.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 292px;" src="http://2.bp.blogspot.com/_dW-BmW1h1P4/SUllfQdpxuI/AAAAAAAABM0/uPkhVr4COj0/s400/task1-02-new-maven-project.png" alt="" id="BLOGGER_PHOTO_ID_5280863625738307298" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;After clicking Next, you will see something similar like the image bellow.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_dW-BmW1h1P4/SUlmQHaMgbI/AAAAAAAABM8/_enbXmjpKDs/s1600-h/task1-03-new-maven-project-2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 332px;" src="http://4.bp.blogspot.com/_dW-BmW1h1P4/SUlmQHaMgbI/AAAAAAAABM8/_enbXmjpKDs/s400/task1-03-new-maven-project-2.png" alt="" id="BLOGGER_PHOTO_ID_5280864465121477042" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In short - there are numerous so called &lt;a href="http://maven.apache.org/guides/introduction/introduction-to-archetypes.html"&gt;archetypes&lt;/a&gt; (maven terminology for project templates) in the list which are identified by GroupId, ArtifactId and Version. Archetypes are “gathered” in catalogs and one of them is &lt;a href="http://docs.codehaus.org/display/M2ECLIPSE/Nexus+Indexer"&gt;Nexus Indexer&lt;/a&gt; which includes all archetypes from the central maven repository.&lt;br /&gt;&lt;br /&gt;If you don’t see any artifacts, then you don’t have central index downloaded or you haven’t chosen to include an optional component Maven Central repository index while installing m2eclipse plugin.&lt;br /&gt;&lt;br /&gt;If you do see the artifacts, then you can skip the next two screenshots.&lt;br /&gt;&lt;br /&gt;Check Software Updates and Add-ons in Help/Software updates… menu in Eclipse to confirm you have all the necessary components installed.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_dW-BmW1h1P4/SUvbEQcSVnI/AAAAAAAABO0/kwOlFDiU0Ik/s1600-h/task1-03.1-installed-software.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 273px;" src="http://1.bp.blogspot.com/_dW-BmW1h1P4/SUvbEQcSVnI/AAAAAAAABO0/kwOlFDiU0Ik/s400/task1-03.1-installed-software.png" alt="" id="BLOGGER_PHOTO_ID_5281555854201607794" border="0" /&gt;&lt;/a&gt;If you don’t have Maven Central repository index in the list of Installed Software, then select Available Software tab and install it by selecting this/these module(s) under Maven Integration for Eclipse Update Site.&lt;br /&gt;&lt;br /&gt;To automatically download Nexus index (which includes Tapestry 5 archetypes) at Eclipse startup check Download repository index updates on startup in the Preferences.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_dW-BmW1h1P4/SUvbUmnbiTI/AAAAAAAABO8/rsIG7ooPGgM/s1600-h/task1-03.2-preferences.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 317px;" src="http://3.bp.blogspot.com/_dW-BmW1h1P4/SUvbUmnbiTI/AAAAAAAABO8/rsIG7ooPGgM/s400/task1-03.2-preferences.png" alt="" id="BLOGGER_PHOTO_ID_5281556135031834930" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Now let's continue. We are looking for &lt;a href="http://tapestry.apache.org/" title="Tapestry (programming)" rel="homepage" class="zem_slink"&gt;Tapestry&lt;/a&gt; 5 archetype, so type tapestry in the Filter input field.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_dW-BmW1h1P4/SUlmiwhx_0I/AAAAAAAABNE/1MdriFI0aSY/s1600-h/task1-04-new-maven-project-3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 400px;" src="http://4.bp.blogspot.com/_dW-BmW1h1P4/SUlmiwhx_0I/AAAAAAAABNE/1MdriFI0aSY/s400/task1-04-new-maven-project-3.png" alt="" id="BLOGGER_PHOTO_ID_5280864785396793154" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Select quickstart archetype, at present (December 2008) the version 5.0.18 is available. Click Next.&lt;br /&gt;&lt;br /&gt;Now the New Maven Project Wizard displays a dialog which asks us about the name of the project. Name is not the right term in Maven world, but we will not go too deeply into theory for now, let’s just type org.driving for the GroupId and school for ArtifactId. Leave the Version as is.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_dW-BmW1h1P4/SUlm8Bu6pyI/AAAAAAAABNM/wXZK6mm6EG0/s1600-h/task1-05-new-maven-project-4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 366px;" src="http://2.bp.blogspot.com/_dW-BmW1h1P4/SUlm8Bu6pyI/AAAAAAAABNM/wXZK6mm6EG0/s400/task1-05-new-maven-project-4.png" alt="" id="BLOGGER_PHOTO_ID_5280865219512018722" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Click Finish.&lt;br /&gt;&lt;br /&gt;After a few moments you should see something very similar to the image below in the Package Explorer.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_dW-BmW1h1P4/SUlnIBR0Y-I/AAAAAAAABNU/heggudWfiiU/s1600-h/task1-06-package-explorer.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 300px; height: 265px;" src="http://4.bp.blogspot.com/_dW-BmW1h1P4/SUlnIBR0Y-I/AAAAAAAABNU/heggudWfiiU/s400/task1-06-package-explorer.png" alt="" id="BLOGGER_PHOTO_ID_5280865425548403682" border="0" /&gt;&lt;/a&gt;If you don’t have a Console View in your Java Perspective, please add it (Window/Show View/Console). Choose Maven Console.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_dW-BmW1h1P4/SUlnUdVLPDI/AAAAAAAABNc/tITZSR5lb-o/s1600-h/task1-07-maven-console.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 162px;" src="http://4.bp.blogspot.com/_dW-BmW1h1P4/SUlnUdVLPDI/AAAAAAAABNc/tITZSR5lb-o/s400/task1-07-maven-console.png" alt="" id="BLOGGER_PHOTO_ID_5280865639237106738" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Let’s stay focused. The task is to create a basic Tapestry 5 skeleton application and run it. Let’s do that!&lt;br /&gt;&lt;br /&gt;Select Run Configurations… from the Run Menu Command.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_dW-BmW1h1P4/SUlnjZ1Q5FI/AAAAAAAABNk/7m1N5FWmgR0/s1600-h/task1-08-run-configurations.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 242px;" src="http://1.bp.blogspot.com/_dW-BmW1h1P4/SUlnjZ1Q5FI/AAAAAAAABNk/7m1N5FWmgR0/s400/task1-08-run-configurations.png" alt="" id="BLOGGER_PHOTO_ID_5280865895995991122" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This will open up the Run Configurations dialog. Locate and select Maven Build and then press the New button.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_dW-BmW1h1P4/SUlnsARG6uI/AAAAAAAABNs/uSB97Xxd38Q/s1600-h/task1-09-run-configurations-2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 310px;" src="http://2.bp.blogspot.com/_dW-BmW1h1P4/SUlnsARG6uI/AAAAAAAABNs/uSB97Xxd38Q/s400/task1-09-run-configurations-2.png" alt="" id="BLOGGER_PHOTO_ID_5280866043752278754" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Now fill in the missing blanks in the next dialog. Name this Run Configuration with something meaningful, like Run Traffic School. The fill in the Base Directory by clicking the Browse Workspace button and selecting the school project. Type jetty:run for the Goal input field. Then click Run and wait for Maven to download all the necessary artifacts. This can take some time the first time, but the next time the &lt;a href="http://jetty.mortbay.com/" title="Jetty (web server)" rel="homepage" class="zem_slink"&gt;Jetty&lt;/a&gt; will launch very quickly.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_dW-BmW1h1P4/SUloAKKydMI/AAAAAAAABN0/zqrStXiKh8I/s1600-h/task1-10-run-configurations-3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 356px;" src="http://2.bp.blogspot.com/_dW-BmW1h1P4/SUloAKKydMI/AAAAAAAABN0/zqrStXiKh8I/s400/task1-10-run-configurations-3.png" alt="" id="BLOGGER_PHOTO_ID_5280866390007510210" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;If all goes well, you should see something like this in the Maven Console:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_dW-BmW1h1P4/SUloOdQ_n3I/AAAAAAAABN8/udNg0YpqJBc/s1600-h/task1-11-maven-console-run.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 182px;" src="http://4.bp.blogspot.com/_dW-BmW1h1P4/SUloOdQ_n3I/AAAAAAAABN8/udNg0YpqJBc/s400/task1-11-maven-console-run.png" alt="" id="BLOGGER_PHOTO_ID_5280866635651981170" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Open your browser and type http://localhost:8080/school&lt;br /&gt;&lt;br /&gt;You should see&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_dW-BmW1h1P4/SUlodR2UkHI/AAAAAAAABOE/uCP-mV2WOCM/s1600-h/task1-12-browser-start-page.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 233px;" src="http://1.bp.blogspot.com/_dW-BmW1h1P4/SUlodR2UkHI/AAAAAAAABOE/uCP-mV2WOCM/s400/task1-12-browser-start-page.png" alt="" id="BLOGGER_PHOTO_ID_5280866890285355122" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;You can click the refresh link and see the time changes – just to prove it works. You can stop the Jetty server by clicking on the red square in the Maven Console. This ends this task.&lt;br /&gt;&lt;br /&gt;You learned how to create a new Tapestry 5 skeleton project by running New Maven Project wizard and how to run the Tapestry 5 web application by creating a maven run configuration.&lt;br /&gt;&lt;br /&gt;Alternative approaches&lt;br /&gt;&lt;br /&gt;You can create a Tapestry 5 skeleton project by running&lt;br /&gt;mvn archetype:create&lt;br /&gt;-DarchetypeGroupId=org.apache.tapestry&lt;br /&gt;-DarchetypeArtifactId=quickstart&lt;br /&gt;-DgroupId=org.driving&lt;br /&gt;-DartifactId=school&lt;br /&gt;-DpackageName=org.driving.school&lt;br /&gt;&lt;br /&gt;You can run the application with&lt;br /&gt;&lt;br /&gt;mvn jetty:run or with mvn tomcat:run&lt;br /&gt;&lt;br /&gt;You can also run the web application with &lt;a href="http://www.eclipse.org/webtools/"&gt;WTP&lt;/a&gt; (Web Tools Project) by right clicking on a project and selecting Run As / Run on Server.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_dW-BmW1h1P4/SUlo91tUPuI/AAAAAAAABOM/vrMX4pPfw7s/s1600-h/task1-13-run-on-server.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 131px;" src="http://3.bp.blogspot.com/_dW-BmW1h1P4/SUlo91tUPuI/AAAAAAAABOM/vrMX4pPfw7s/s400/task1-13-run-on-server.png" alt="" id="BLOGGER_PHOTO_ID_5280867449667075810" border="0" /&gt;&lt;/a&gt;If you haven’t defined a server yet or even not downloaded one, then you have some more work to do. Choose the server (&lt;a href="http://tomcat.apache.org/index.html"&gt;Tomcat 6.0&lt;/a&gt; for example).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_dW-BmW1h1P4/SUlpHYrmhjI/AAAAAAAABOU/cynONBDHweg/s1600-h/task1-14-run-on-server-2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 323px; height: 400px;" src="http://3.bp.blogspot.com/_dW-BmW1h1P4/SUlpHYrmhjI/AAAAAAAABOU/cynONBDHweg/s400/task1-14-run-on-server-2.png" alt="" id="BLOGGER_PHOTO_ID_5280867613673948722" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In the next step choose the directory of the Tomcat you have downloaded and unzipped to.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_dW-BmW1h1P4/SUlpYGbOQpI/AAAAAAAABOc/Y_RiYCj--1I/s1600-h/task1-15-run-on-server-3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 318px;" src="http://2.bp.blogspot.com/_dW-BmW1h1P4/SUlpYGbOQpI/AAAAAAAABOc/Y_RiYCj--1I/s400/task1-15-run-on-server-3.png" alt="" id="BLOGGER_PHOTO_ID_5280867900831187602" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;After clicking on Next, a dialog appears which shows which projects can be run on this Tomcat server.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_dW-BmW1h1P4/SUlpjUr0fwI/AAAAAAAABOk/EvhN-yFF2m8/s1600-h/task1-16-run-on-server-4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 318px;" src="http://1.bp.blogspot.com/_dW-BmW1h1P4/SUlpjUr0fwI/AAAAAAAABOk/EvhN-yFF2m8/s400/task1-16-run-on-server-4.png" alt="" id="BLOGGER_PHOTO_ID_5280868093637459714" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Our project is already configured, so just click Finish. The Tapestry 5 project will be launched and first page displayed in the embedded browser inside Eclipse.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_dW-BmW1h1P4/SUlpv_VljBI/AAAAAAAABOs/QTiJXzIlkME/s1600-h/task1-17-run-with-wtp.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 364px;" src="http://4.bp.blogspot.com/_dW-BmW1h1P4/SUlpv_VljBI/AAAAAAAABOs/QTiJXzIlkME/s400/task1-17-run-with-wtp.png" alt="" id="BLOGGER_PHOTO_ID_5280868311245360146" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Running with Tomcat with WTP causes the Tomcat container to reload the context (by default) on any file change in the context path. This is sometimes not desirable as it hides the jewel of Tapestry – &lt;a href="http://tapestry.apache.org/tapestry5/guide/reload.html"&gt;live class reloading&lt;/a&gt;. To be discussed in the next task.        &lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/8cc4e1ac-3b23-416d-a8d2-6c0e894f786c/" title="Zemified by Zemanta"&gt;&lt;img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=8cc4e1ac-3b23-416d-a8d2-6c0e894f786c" alt="Reblog this post [with Zemanta]" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6420029857026901711-8315371770360096726?l=bbwebcraft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bbwebcraft.blogspot.com/feeds/8315371770360096726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bbwebcraft.blogspot.com/2008/12/task-1-create-skeleton-tapestry-5.html#comment-form' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/8315371770360096726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/8315371770360096726'/><link rel='alternate' type='text/html' href='http://bbwebcraft.blogspot.com/2008/12/task-1-create-skeleton-tapestry-5.html' title='Task 1 - Create a skeleton Tapestry 5 project and run it.'/><author><name>Borut Bolčina</name><uri>https://profiles.google.com/100412320755782895986</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-lSS0jJqb0lE/AAAAAAAAAAI/AAAAAAAAAAA/Ilphj3SxrAI/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_dW-BmW1h1P4/SUllOnALbVI/AAAAAAAABMs/MrIl3EViuCo/s72-c/task1-01-select-a-wizard.png' height='72' width='72'/><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6420029857026901711.post-6472938838643006237</id><published>2008-12-17T21:28:00.001+01:00</published><updated>2008-12-17T23:15:24.533+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Development Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='tapestry 5'/><title type='text'>Tapestry 5 - Setting up the environment</title><content type='html'>Tools stack: Eclipse Ganymede, Maven 2, m2eclipse Maven Eclipse plugin&lt;br /&gt;&lt;br /&gt;1. Install &lt;a href="http://java.sun.com/javase/downloads/index.jsp"&gt;JDK 1.5 or greater&lt;/a&gt;&lt;br /&gt;2. Download &lt;a href="http://www.eclipse.org/" title="Eclipse (software)" rel="homepage" class="zem_slink"&gt;Eclipse IDE&lt;/a&gt; for Java EE Developers&lt;br /&gt;3. Install &lt;a href="http://maven.apache.org/"&gt;Maven 2&lt;/a&gt;&lt;br /&gt;4. Install &lt;a href="http://m2eclipse.codehaus.org/"&gt;m2eclipse&lt;/a&gt; plugin&lt;br /&gt;&lt;br /&gt;This is by no means the only possible stack. You can develop &lt;a href="http://tapestry.apache.org/tapestry5/"&gt;Tapestry 5&lt;/a&gt; web applications with any IDE you can think of, even plain notepad if you wish. Of course with Java editors and &lt;a href="http://en.wikipedia.org/wiki/Code_refactoring"&gt;refactoring&lt;/a&gt; capabilities of modern IDEs such as &lt;a href="http://www.netbeans.org/" title="NetBeans" rel="homepage" class="zem_slink"&gt;NetBeans&lt;/a&gt;, &lt;a href="http://www.jetbrains.com/idea/"&gt;IDEA&lt;/a&gt; and Eclipse raises your productivity to a next level.&lt;br /&gt;&lt;br /&gt;Also, Maven is not mandatory, you can use any build tool you wish.&lt;br /&gt;&lt;br /&gt;Hopefully, as time permits, I will post Tapestry 5 releated stuff in this blog. I will follow my moto as in this latin proverb: "By learning you will teach, by teaching you will learn.".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6420029857026901711-6472938838643006237?l=bbwebcraft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bbwebcraft.blogspot.com/feeds/6472938838643006237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bbwebcraft.blogspot.com/2008/12/tapestry-5-setting-up-environment.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/6472938838643006237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6420029857026901711/posts/default/6472938838643006237'/><link rel='alternate' type='text/html' href='http://bbwebcraft.blogspot.com/2008/12/tapestry-5-setting-up-environment.html' title='Tapestry 5 - Setting up the environment'/><author><name>Borut Bolčina</name><uri>https://profiles.google.com/100412320755782895986</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-lSS0jJqb0lE/AAAAAAAAAAI/AAAAAAAAAAA/Ilphj3SxrAI/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
