0 Replies Latest reply on Jan 13, 2010 12:36 PM by kgladwin

    Display an image bytearray from a servlet in Flex?

    kgladwin Level 1

      Hi All,

       

      I'm reading an image using a servlet. I get the byte array in the servlet.

      I want to display that as an image on my flex page. I'm trying to set the byte array in the response and read it in my actionscript class.

      But this is not working. Can someone please help.

       

      response.setContentType("image/jpeg");
      PrintWriter out = response.getWriter();
      out.println((Object)data);
      response.getOutputStream().write(data);