Posted By:
the_daniel_the_daniel
Posted On:
Friday, June 9, 2006 04:05 AM
I am interested in the way of dynamically generating an image in a web browser. The image should be formed on the servlet, more precisely with the aid of a servlet, and reloaded in the web browser every time it suffers modifications (for example, elements are drawn). The drawing and displaying part is already functioning not as a server application, but as a desktop one. The result of the drawing actions are displayed in a Bufferd Image view. What I have to do is to display this image in the browser, encoded as a gif (I already know how to do the encoding part). //code from TheServlet.java ImageViewPort view = new ImageViewPort(60
More>>
I am interested in the way of dynamically generating an
image in a web browser. The image should be formed on
the servlet, more precisely with the aid of a servlet,
and reloaded in the web browser every time it suffers
modifications (for example, elements are drawn).
The drawing and displaying part is already functioning
not as a server application, but as a desktop one. The
result of the drawing actions are displayed in a
Bufferd Image view. What I have to do is to display
this image in the browser, encoded as a gif (I already
know how to do the encoding part).
//code from TheServlet.java
ImageViewPort view = new ImageViewPort(600, 600); //
BufferedImage type
Image image = view;
g = image.getGraphics();
response.setContentType("image/gif");
GifEncoder encoder = new GifEncoder(image, out);
encoder.encode();
How would I correctly reference in the HTML form this
servlet? In the HTML form I have to display the
dynamically created GIF image as a server side image
map?
// code from the HTML form
img WIDTH=600 HEIGHT=600 BORDER="2"
How should be written the source of this image map?