Think about how a HTML page containing an image is built. Each chart or other image must be the result of a separate IMG tag that you write in your
JSP. The SRC= attribute in the IMG tag should point to a servlet that can generate the binary image data.
You can't use a JSP to generate typical image files because a JSP is designed to output text, not binary image data. There have been a number of discussions of this here. Any book on servlets will tell you how this is done.
Bill