Behavior, Content, Money – 3 Things you should never give away for free!!!

BCmoney MobileTV

How to deploy an Apache Tiles project

Posted by bcmoney on August 22, 2011 in Java, XML with No Comments

No Gravatar

Apache Tiles is Java’s leading version of a widget container, built on the Portlet specification. In Java, portlets are similar in concept and serve almost the same functional purpose as widgets in the web world

Long before the release of the W3C’s Widget specification, most modern programming languages had already (predictably) evolved a system for plugins, extensions and/or the representation of widgets. One such platform (also happens to be a web platform) known for its high degree of modular design and use of separate templates to comprise a given view, is Apache Tiles.

I’ve accepted a new position at TeamSpace / TheREDspace in Halifax, NS; and, while I’m not at liberty to divulge much juicy information about their clients or the specific technology stacks they use, I can mention that Tiles is a great open source project on which some of their very popular (i.e. heavily trafficked) online services are currently running quite successfully. They are able to perform updates in near real-time with Continuous Integration build servers that push to an staging server where business owners and testers can then sign-off on a given release on a feature-by-feature basis. Usually, even with good deployment practices, you need to sign off on a whole release, but with this approach leveraging Apache Tiles, individual functionality within the release can be given a green, yellow or red light.

As a developer, that means the feedback is instantaneous, so for this new position, I’ve really had to up my game and taken the time to brush up on my understanding of portlets. I wish I could share more, I actually prepared a 30-page document summarizing all the steps in great detail but it can’t be shared and is the property of my employer. That said, in case someone wants to try to integrate Tiles to their own Java web projects, I’ll include some useful steps here for getting started with your first Tiles project:


  1. Point your POM to the MAVEN repository:
  2. First Build/compile, then Run your project


  1. Download project:
  2. Unzip to your project directory (or a common one if you plan to reuse it alot)
  3. Start a new default Java web project in your Eclipse IDE (should also work with NetBeans and others) then create a sub-directiory/sub-folder for libraries… for simplicity I usually just call mine  “libs” or something similar
  4. Physically copy the tiles-extra.jar file to “libs” then add to your project’s BUILD Path
    (depends on IDE but assuming you know how, if not right-click on the project and something like “Configure Path” as per Eclipse… for your’s if you still can’t figure out, try a search engine)
  5. Now you can add some basic Tiles and then try to Build/compile then Run your project

After following either the Maven or Manual setup, you should be ready to go with your first Tiles project.

If you had trouble following any of these steps, you can always just try the following sample code project (was setup as Eclipse project so may need conversion/import process to open properly in another IDE):




« previous post

Learning Python">