JSF & Java Blog

Discussion on Java and JSF, including Spring, Maven, Eclipse and Jenkins

jQuery noConflict

Newer jQuery with Richfaces

Richfaces 3.3 comes with jQuery 1.3.2 and so you may find you want to use some newer features of jQuery that are only available in a later version. It is actually very easy to use a newer version of jQuery with Richfaces by simply including the newer version and then putting it into noConflict mode […]

No Change

Guava ImmutableMap Spring bean

I previously had some maps defined as Spring beans in my applicationContext.xml file. An example of a basic Map is shown below: I wanted to make these all immutable and so Guava’s ImmutableMap seeemed the logical Map type to use. However, ImmutableMap is abstract so you can’t just do the following: Instead, thanks to help […]

406 Not Acceptable

Spring MVC 406 status code from AJAX requests

Recently after upgrading from Spring MVC 3.1.2.RELEASE to 3.2.0.RELEASE, all of our AJAX requests stopped working, and instead returned a 406 status code (see here for status code meanings). We were using Jackson 2.1.2, the following snippet from the pom.xml file shows the two dependencies: There were some changes made with the 3.2.0.RELEASE in regards […]


Using Reflection to print out an object

This is really old news but I always forget which class to use when I need to provide a toString method that uses reflection to print out all the classes values ToStringBuilder.reflectionToString in the apache commons library gives this functionality. e.g. We are currently starting to use Guava as a Utility library and the class […]

Multi Module

Preventing Maven Plugin Mojo running multiple times for multi module projects

Amongst other tasks, in development we have a need occasionally to copy static content files into our web root from a network location. We decided to create a maven plugin to allow these tasks to be setup quickly on the command line (rather than having a collection of batch scripts to do this). Our maven […]


Beware what you put in the endorsed dir!

We use docflex to build our XSD documentation, integrating with maven to produce XSD documentation in our maven site reports. I recently had to upgrade some developers from docflex-re 1.8.0 to 1.8.5, this migration went fine. For some reason it didn’t on my machine. I received the following error: Anyway to cut a long story […]


Upgrading to Maven 3 Site Reporting

Whilst upgrading our build to use Maven 3 and the reporting to use the maven-site-plugin 3.0-beta-3 I used the following steps to upgrade the reporting. When I ran the build it failed With the message The plugin I was using (a version of the maven css validation plugin that I have modified to generate reports) […]


Using Maven to check facelets are valid

Although Eclipse validates our xml documents, sometimes invalid xml documents can get committed into our source repository by accident. Using the maven xml-maven-plugin we can force the build to break when xml documents aren’t welformed. Currently we are only doing the check on facelets (files with a .xhtml extension): The xml snippet below shows the […]


Top reasons to adopt Maven 3

A great article was recently posted on the Sonatype blog on the top 10 reasons to move to Maven 3 It will be interesting to see if there is a significant speed increase, as it will be nice to reduce the time of our main nightly build which usually takes about 90-95 minutes. Luckily, Hudson […]