andiamo più sullo specifico:

SERVLET:
ServletOutputStream out2 = response.getOutputStream();
String pathImage;
RenderedImage img;

img=null;
pathImage = servletPath+"/images/"+request.getSession()+"mappaTagliata_1.gif";
while(img == null)
img = ImageIO.read(new File(pathImage));
ImageIO.write(img, "GIF", out2);

out2.flush();

CLIENT:

servletPath = this.getServletContext().getRealPath(getServletInf o());
url = new URL("http://83.211.114.229:8080/test/ProvaGoogleMaps?latitudine=41.893554&longitudine=1 2.480469&zoom=10");
urlConnection = url.openConnection();

outputFile = new File("nome immaginie");
img=null;

img = ImageIO.read(urlConnection.getInputStream());
if(img!=null)
ImageIO.write(img, "GIF", outputFile);
else
System.out.println("non ho letto alcuna immagine");

questo è quello che faccio quando devo passare una sola immagine, come posso modificarlo per passare più immagini???