JSP is a template technology that creates an HTML page to send to the browser. So the browser gets an HTML page that you could have written by hand. When you create an HTML file do you type the image data into it? Of course not. So your JSP can't do that either.
How do you reference an image in an HTML file? With a URL. So your JSP needs to do the same. Use a URL that references a servlet that serves the image data.
P.S. This question has been asked dozens of times in this forum. Please SearchFirst.