Hi Naveen-
I don't have a ton of time to get all the code right for you, but here
are the basic steps.
1) Create a servlet and correctly specify it in your web.xml.
2) In the doGet() method of your servlet create or open an image.
There are various ways to do this. What you'll likely want to do is
create a buffered image and paint onto the graphics canvas. Flush
this canvas when you're done.
3) Use ImageIO to write your image to the output stream. Something
like: ImageIO.write(image, "png", response.getOutputStream()). Also
make sure you set the correct content type of the response.
4) In gwt make a call to your servlet using the name you specified in
the web.xml: new Image("http://---/servlet"). You can add parameters
or whatever makes sense ... just pick them up with request.getParameter
().
Good luck!