2005 IR Help Posted August 23, 2006 Share Posted August 23, 2006 By: praveen rao - pravnrao Image 'px' prblm in HTML 2004-03-08 09:34 Hi, I have a problem with 'px' in the HTML output. This image shows up sometimes in IE . Most of the times I get a broken image. If I right click and "show picture" all images show up. Its not consistent.. I put the jasperprint in session and get it from JSP JasperPrint jasperPrint = (JasperPrint)session.getAttribute("JASPER_PRINT"); JRHtmlExporter exporter = new JRHtmlExporter(); StringBuffer sbuffer = new StringBuffer(); Map imagesMap = new HashMap(); session.setAttribute("IMAGES_MAP", imagesMap); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_STRING_BUFFER, sbuffer); exporter.setParameter(JRHtmlExporterParameter.IMAGES_MAP, imagesMap); exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "/images/"); exporter.setParameter(JRExporterParameter.PAGE_INDEX, new Integer(pageIndex)); exporter.setParameter(JRHtmlExporterParameter.HTML_HEADER, " "); exporter.setParameter(JRHtmlExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE); exporter.setParameter(JRHtmlExporterParameter.BETWEEN_PAGES_HTML, " "); exporter.setParameter(JRHtmlExporterParameter.HTML_FOOTER, ""); exporter.exportReport(); I looked at all the solutions related to this and none worked 100%. 1) Tried to call this directly by putting the px file in images directory. exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "/images/"); 2) Used a servlet (during debug it goes to the servlet, but the image is still borken). exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "/servlets/image?image="); 3) this did not work exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "image.jsp?image="); Please help.. Thanks Praveen 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