Friday, February 12, 2010

JSF 2.0 RESTful URLs with PrettyFaces

JSF's RESTless nature is a big problem to some Java EE web developers. Not everybody cares, unfortunately I'm coming from a Ruby on Rails background so I'm one of the guys who cares.

In JSF, by default every page transition is done using HTTP POST. Even when you use JSF's GET support aka bookmarkable URLs, you still don't get the pretty SEO-friendly URLs that frameworks like Ruby on Rails generate by default.

Lucky you and me, there is a solution: PrettyFaces by OcpSoft.

Checkout the  PrettyFaces slideshare presentation below on why pretty, bookmarkable, SEO-friendly URLs are important for a JSF web application; and how to do it.