Hello
Im trying to generate a image from a servlet and display it with browser.
Lets say I want to do something like this:
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, java.io.IOException {
BufferedImage bufferedImage = new BufferedImage(620, 420, BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = bufferedImage.createGraphics();
g2d.setColor(Color.black);
g2d.fillRect(0, 0, 620,420);
g2d.setColor(Color.yellow);
bufferedImage.getGraphics();
}
This simply generates a box with a box rect. Ignore the yellow.....
Now obviously I have to get the response as I call the servlet again and display the image (as it physically isnt stored anywhere)
How can I do this? Or somewhere I can start at least.....
Thanks.