This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Assuming that the HTML page that shows the images is unchanging, you need a servlet that can respond to the image requests. <img src="http://someserver/servlet/imagemaker?imgid=someid"> This will require you to write a doGet method that can pick up the id and serve up the image. Note that when serving images you have to set the content type and content length. Serving custom images is covered in most Servlets books, (including mine). Bill