Once again, you don't show an image on a JSP; a JSP is just a template. You show the image in the HTML page that is generated from the JSP with an <img> tag. That means that the image tag had to be able to use a URL to get the image data. Passing the image data to the JSP itself is not useful. Write a servlet that sends the image data separately.