Calling a dynamic image servlet in a JSP page.
I have a servlet, MakeImage.java, as follows...
imports...
publicclass MakeImageextends HttpServlet{
publicvoid doGet(
HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException{
response.setContentType("image/jpeg");
// Create image
int width=500, height=300;
BufferedImage image =new BufferedImage(
width, height, BufferedImage.TYPE_INT_RGB);
. . .
// Dispose context
graph.dispose();
ServletOutputStream sos = response.getOutputStream();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos);
encoder.encode(image);
}
}
I can run it by typing in its location in the address bar and the image is displayed. How do I call this servlet, or image, from a JSP page?

