I know the how to show th image on jsp file. But never thought how it works? I mean Does image get rendered with html page right at the time when jsp page
is evaluated to html content by webserver and transferred to browser as bytes along with other html or it does not happen this way.
I did discuss with my collegues but they were not sure too. One of them told me that when you request any JSP page from server, jsp page is evaluated
to corresponding html content and images are not rendered at this point of time.So when browser gets this html page and see the tag like below,browser
makes separate call to server to for each image.Is that correct?If yes ,if there are 50 images on jsp page, will 50 request go to server to download the
image. He also mentioned not only images but javascript also included in JSP this way only?
I am not sure when and how the image included in jsp page is requested? Could not get this fact cleared
thru googling too. T
src="getImage.jsp"
The question came in my mind because on change of some value in dropdown, i want to to change the image . I thought i could do it
on client side. But if go by the approach mentioned in the last, looks like image has to be downloaded from server first.
It’s very hard to tell what you’re asking. If you mean, does an image you include in your JSP page via an
imgtag (e.g.,<img src="/path/to/image.jpg">) somehow get “baked into” your JSP page when it’s compiled into a servlet by your JSP container, the answer is no. The browser will request the JSP page, get back HTML et. al., and then request the image.