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

embed images in html


sampathku

Recommended Posts

Folks

I am trying to output a report as HTML, the eventual goal to actully stream the HTML into an HTML email rather than to screen.

                PrintWriter pw = response.getWriter();
                response.setContentType("text/html");
               
                JRHtmlExporter htmlExporter = new JRHtmlExporter();
                htmlExporter.setParameter(JRExporterParameter.JASPER_PRINT, jPrint);
                htmlExporter.setParameter(JRExporterParameter.OUTPUT_WRITER, pw);
                htmlExporter.exportReport();
               
                pw.flush();
                pw.close();

There is an image on the page, but it's none of the areas marked with the missing image cross or the other funny blank squares. I cant use an ImageServlet because I am not hosting a web application. I get request and have to return a html with the images intact. Any Idea how I can achieve this.

Cheers

Sampath

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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...