Adding new views to a Spring Roo app using Tiles

Spring Roo by default uses Tiles to construct your views. Without some digging through the generated configuration files, this is not as obvious as you’d think, so by dropping a new jspx file in one of your views subdirs and trying to forward to it from your Controllers will give you an error like this:

Servlet.service() for servlet ContestEntry threw exception:
javax.servlet.ServletException: Could not resolve view with
name 'somedomain/someview' in servlet with name 'WebappName'

Each of your view subdirs beneath /WEB-INF/views/ has it’s own views.xml file that declares it’s Tiles definitions. To add a new view, you need to add both an entry in the corresponding views.xml file and drop a new jspx file in the same views dir

Time traveller brings J2EE back to the future from 2006

I’m sorry, J2EE? You realise Java EE has not officially called ‘J2EE’ since the release of Java EE 5 back in 2006, right? It’s now 2012. That’s SIX YEARS AGO.

For a while after the name changes it was acceptable and common to hear all combinations of the names, for example, referring to Java EE 5 as J2EE 1.5. The last EE version with the J2EE name was J2EE 1.4, released in 2003.

When I hear J2EE today, it tells me one of the following:

  • you haven’t actually worked hands on with Java since roughly 2006. At some point in the past you did have some hands on experience, but not recently, at least not in the last few years
  • you’ve been working with J2EE 1.4 technology since 2006
  • you’ve been working in cave in 2006 and have just emerged to get some sunlight
  • you just picked up an old copy of a J2EE book and decided to learn Java Enterprise technology, not realizing how old the book was, or the fact that it’s not vastly out of date
  • you possess a time machine and have just traveled to the future from 2006

Please – if you haven’t worked with Java technology for the last six years, please try and get up to date. A lot has changed in the last six years.

Also, if you have been working in the technological cave (a long running development project) for the past six years… you owe it to yourself and your career to try and keep more up to date with the tools that you use.