It really depends on how the actual images are acquired and what they are used for.
If you are building a photo-sharing website, for example, where images are first-class citizen s, I fully agree with duffymo's answer - they should be loaded by service layer and be a part of the model.
If, on the other hand, images in question are purely presentational in nature and are available as public images within your web app (for example, you may be displaying status of some process as red / yellow / green light), you can render them directly in view. Of course, in this scenario it's rather strange to keep actual image paths in the database - I would rather imagine image path would be stored somewhere in the resource bundle instead.
Using the latter approach, presumably image paths you have are relative to some "base" folder and full image path would be something like ${prefix}/${base}/${imagePath}
:
prefix
, depending on your deployment configuration, may either be explicitly specified somewhere in configuration (if you have a dedicated image server, for example) OR be as simple as /context
where context
is path under which your webapp is deployed (if everything is served from one simple server, no load balancing, etc...)
base
would be taken from configuration (or can be empty)
imagePath
is what you get from the model
Rendering image path directly via JSP should be trivial using the above approach.