I'm using Netbeans 6.9, JSF 2.0 and Glassfish server 3. I have a jsf page with two links, one that shows a report in pdf mode an another that shows it in html mode. My report in pdf shows all the contents ok, but my html report includes null images between texts. I configured the ImageServlet in my web.xml file, indicating "net.sr.jasperreports.j2ee.servlets.ImageServlet" as servlet class and /image as URL pattern. My bean called from my jsf page do the export with the code: exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_WRITER, response.getWriter()); exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, request.getContextPath() + "/image?image="); exporter.exportReport(); The problem is that Glassfish shows an error when execute the exportRetport() instruction in html mode. The error is: Warning StandardWrapperValve[imageServlet]: PWC1382: Allocate exception for servlet ImageServlet java.lang.ClassCastException: net.sf.jasperreports.j2ee.servlets.ImageServlet cannot be cast to javax.servlet.Servlet Any suggestions? Thanks in advance.