First, JSP is a viewing technology that provides a template for writing HTML / CSS / JS inside and the ability to interact with Java internal code to control page flow and access data to the backend. Your problem is more in HTML.
Now, to display the image on an HTML page, you need an HTML element <img>. To define / highlight an image, you just need to specify the attribute srcon the URL. For example.
<img src="url/to/image.jpg">
( , URL-, , http://)
, , Servlet, url-pattern, URL- . .
<img src="imageservlet/image.jpg">
( , , /imageservlet/*, , , request.getPathInfo())
<img src> GET, doGet() . HTTP , , OutputStream , , (Content-Type, Content-Length / Content-disposition). ImageIO#write() BufferedImage OutputStream.
. Files#copy() ImageIO#write().
response.setContentType("image/png");
ImageIO.write(bufferedImage, "png", response.getOutputStream());
. :