I created simple JSP that convert graphic to jpeg like that
//*****Make a Simple Image object*****
response.setContentType("image/jpeg"
BufferedImage image=new BufferedImage(500,100, BufferedImage.TYPE_INT_RGB);
Graphics g=image.getGraphics();
g.setColor(Color.blue);
g.fillRect(425,25,50,50);
g.setColor(Color.red);
g.setFont(new Font("Serif", Font.ITALIC, 48));
g.drawString("Hello World!", 10, 50);
JPEGImageEncoder encoder=JPEGCodec.createJPEGEncoder(response.getOutputStream());
encoder.encode(image);
//*****End a Simple Image object*****
I'd like to know how to mixed that picture with regular html tags before and after image, or may be it's possible
to combine 2 JSP one that generate image and another that produce a text.
//*****Make a Simple Image object*****
response.setContentType("image/jpeg"
BufferedImage image=new BufferedImage(500,100, BufferedImage.TYPE_INT_RGB);
Graphics g=image.getGraphics();
g.setColor(Color.blue);
g.fillRect(425,25,50,50);
g.setColor(Color.red);
g.setFont(new Font("Serif", Font.ITALIC, 48));
g.drawString("Hello World!", 10, 50);
JPEGImageEncoder encoder=JPEGCodec.createJPEGEncoder(response.getOutputStream());
encoder.encode(image);
//*****End a Simple Image object*****
I'd like to know how to mixed that picture with regular html tags before and after image, or may be it's possible
to combine 2 JSP one that generate image and another that produce a text.