My application needs to implement dynamic images, where a browse can get served a JPG or PNG out of my data base.
I have been reading this thread and am not getting very far in learning from it. Can someone provide a link to a tutorial about how to implement a ResourceHandler.
Having looked through all the books Amazon offers on JSF 2.0, none of them seem to cover this topic. Thanks in advance.
UPDATE: This question is withdrawn since I took a different path to the solution, which was simply to implement a Servlet to serve up the images. What I was asking was how to get the JSF Facelets Servlet to response to a GET with a "image/png" media type. Although it seems that you can do that through the ResourceHandler facility, I found that implementing a Servlet is easier, and what's more you have more flexibility with regard to the resource path name.
What I was also surprised about is that although the Servlet doesn't have a FacesContext when it processes a Request, you CAN inject beans or resources that are CDI managed. This gave me the same access to the JPA back end as the rest of the application. So my issue is resolved.