Multiple Images/ServletOutputStream question


Web tier: servlets, JSP, Web frameworks: Multiple Images/ServletOutputStream question

  1. Multiple Images/ServletOutputStream question (3 messages)

    I'm retrieve several images from the database and trying to display them on the web.

    I'm getting the gifs in an array of btyes and then
    writing it to the ServletOutputStream. however,
    i can only write out 1 image. trying to write out
    more than 1 image either give me a socketexception
    or it just simply doesn't appear.

    any ideas? thanks in advance.
  2. I have always ahd problems storing images in the is a huge performance issue and unneccessary complicated. If you can, store the image on the filesystem and a URL reference in the database...makes life muich easier.
  3. well, try closing the stream after each image loads.

  4. What about loading the byte arrays into elements of a collection object ( HashMap, ArrayList) and then passing that to a JSP?