Saturday, January 22, 2011

ICEFaces 2.0 charts migration

Today I was upgrading an ICEFaces 1.8 / JSF1.2 project to ICEFaces 2 and JSF 2. Everything worked well, except my charts weren't displayed anymore. After snooping around in the ICEFaces code, I found out that they used a new JSF 2 mechanism to serve the chart images, called resource handlers. The problem is that the ICEFaces resource handler URL isn't handled by the JSF servlet. This means the resource handler never gets executed. To make sure it gets executed, you should add the mapping to your web.xml file as follows:
<servlet-name>Faces Servlet</servlet-name>

This will make the charts visible again. The same goes for the DataExporter component, which also doesn't work as long as you don't add this mapping.

No comments:

Post a Comment