According to the PrimeFaces website, "PrimeFaces is an open source component suite for Java Server Faces featuring 70+ Ajax powered rich set of JSF components. Additional TouchFaces module features a UI kit for developing mobile web applications.". Since it is an OpenSource JSF implementation that is very close to releasing JSF 2.0 compliant components, I figured it was time to try it out on GlassFish v3.
A very easy and powerful way of creating Java EE 6 compliant applications, is to use NetBeans 6.8, which comes with great GlassFish v3 and Maven support. The first thing to do is to create a new Maven Web Application. The wizard that helps you create it allows you to specify the Java EE version, which in this case should be 6. In order to make sure the PrimeFaces libraries are included in your project, add the next dependency to your pom.xml file
The left bar is the one being dragged by the mouse.
Another nice PrimeFaces component is the fileUpload component. It supports single and multiple file uploads. To be able to use the fileUpload component, a few Apache Commons dependencies need to be added:
It is quite easy to get started with PrimeFaces using Maven and GlassFish. Please bear in mind that the fileUpload component is quite picky concerning the order in which the filters are specified in web.xml in case there is more than one. Please see this forum thread for more info.
In case you're having troubles following the instructions in this blog, here is my NetBeans project. Since it is a Maven project you should be able to open it in Eclipse or any other IDE.
In the past few month several Java EE 6 related JSRs (Java Specification Requests) have been finalized. The final ballot for them ended on November 30 and all were approved. Today, December 10, 2009, Java EE 6 and GlassFish v3, THE reference implementation of Java EE6, are released.
Four and a half year after the release of Java EE 5 we enter the next Java EE era. GlassFish v3 is the first application server that fully supports all Java EE 6 technologies. The list of supported technologies includes, but is not limited, by
CDI (Contexts and Dependency Injection)
GlassFish v3 can be downloaded in two flavours. The first one contains all of the Java EE 6 technologies, the second one contains all technologies that are specified in the Java EE 6 Web Profile specification.
If there was only one GlassFish v3/Java EE 6 thing I'd like to mention then it would be that Java EE has become more powerful than ever before. Now we can do with annotations instead of XML configuration, we can do without ear files because war files are sufficient, Ajax has been standardized, and asynchronous calls are supported all the way from the client almost down to the database. And now you can do all that with GlassFish v3. A reason to celebrate? You bet it is!