frjasper Posted November 30, 2010 Share Posted November 30, 2010 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 ImageServletjava.lang.ClassCastException: net.sf.jasperreports.j2ee.servlets.ImageServlet cannot be cast to javax.servlet.Servlet Any suggestions? Thanks in advance. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now