Kapil Shardha wrote:In HTML, the src attribute of img tag takes a path of an image ...
Right. It doesn't contain image bytes. So your JSP needs to do the same. Specify a path, not bytes.
Secondly, the src attribute specifies the URL of a server resource that returns the image data
no matter how that data is stored.
The latter part is important. As far as the browser is concerned, as long as the response to the src URL serves the image data, it doesn't care where it comes from.
So now what do you do next?