Sending a gif file through the output stream of the redirected h

Discussions

Web tier: servlets, JSP, Web frameworks: Sending a gif file through the output stream of the redirected h

  1. Within a jsp page I would need to display an image inside an image tag, which is specified by the url to a servlet, which would feed that image into an output stream of the http response.<BR>
    This mechanism was working fine until I had to hit an intermediary security servlet which would redirect the request to the actual servlet that would be sending the file.<BR>
    A question: am I loosing the ability to feed files to the output stream of the http response and having them displayed inside an image tag which originated the request if the request has been redirected in the process? <BR>
    Thanks.

    Threaded Messages (1)

  2. YES[ Go to top ]

    Hi Alexei,

    I just tried it with a small test web application and it worked. My "RedirectToRealImageServlet" called my "RealImageServlet" which delivers an image by sending a redirect via response.sendRedirect(...).

    Cheers,

    René