The code is likely is creating an incorrect URL for the image to be accessed. Copy the image URL from the HTML and paste it in the browser - is that where the image lives?
As an aside, you should never do this kind of stuff in a JSP - that's what servlets and backing beans are for. Read up on the MVC pattern to learn why.
Ulf Dittmer wrote:The code is likely is creating an incorrect URL for the image to be accessed. Copy the image URL from the HTML and paste it in the browser - is that where the image lives?
Yes,
the url in the browser showing the image properly,
but not showing in the jsp page properly.