May 15th, 2011 by Christian Kaltepoth

Serving dynamic file content with PrettyFaces

PrettyFaces offers a very simple and flexible way to create bookmark-able RESTful URLs in JSF applications. This short article will show you how easy it is to use PrettyFaces for serving other dynamic content like images or PDF files. Many applications are required to generate some kind of “dynamic” content for the user. A typical example are product images in a web shop. These are mostly not deployed with the application archive but rather stored in an external directory or a database. Another example are PDF reports that are generated on demand when a user requests them.