I am trying to create a pie chart in a servlet, which I am running on Domino. Initially, on the screen, I need to show a table, followed by the pie chart below. 1. The first part is fine - I create a PrintWriter object like this: PrintWriter pw = response.getWriter();
2. I read values from the DB, write these values into two arrays, and show the table. 3. Then I close the PrintWriter object, like this:
I think that you actually want two servlets, one to create the chart image, and one to create the html (including an <img> tag with the src attribute set to the URL of the image servlet).