Jump to content
We've recently updated our Privacy Statement, available here ×

Image Servlet Not Rendering


gstafford

Recommended Posts

Hello,

I've created a portlet using Liferay.  I believe I have this set correctly but I can not get the images to display.  I'm new to Java so I'm trying to determine the best way to debug this.  My code is here:

                JRHtmlExporter exporter = new JRHtmlExporter();		request.getPortletSession().setAttribute(				ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE,				printObject);		exporter.setParameter(JRExporterParameter.JASPER_PRINT, printObject);		exporter.setParameter(JRExporterParameter.OUTPUT_STRING_BUFFER,	outputBuffer);		exporter.setParameter(JRHtmlExporterParameter.IMAGES_MAP, new HashMap());		exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "../servlets/image?image=");		exporter.setParameter(JRHtmlExporterParameter.IS_WHITE_PAGE_BACKGROUND, java.lang.Boolean.FALSE);		exporter.setParameter(JRHtmlExporterParameter.IGNORE_PAGE_MARGINS, java.lang.Boolean.TRUE);		exporter.exportReport();

 
And I have this code in my web.xml
 
			ImageServlet		net.sf.jasperreports.j2ee.servlets.ImageServlet				ImageServlet		/servlets/image	

 
Everywhere I read makes me believe I have this right, but I am getting nothing in the HTML version.  The PDF and XLS versions of the reports all show the graphics and graphs.  Any clues on how to debug this or troubleshoot this and track it down?
 
Thanks,
George
Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 year later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...