I got Spring 2.5.6 and I’m trying to implement some stupid functionality within.
I have a photo directory somewhere in my server machine and I want to expose these photos to the user. What is the common solution for this issue?
P.S.
By now I’m writing my photos to the response using my own controller, and that is not very handy for me, cause I want to keep my photo’s url nice and friendly (for example like /myServlet/images/012345.jpg).
Having your own controller is a fine solution. Here is a simplified copy from my
PictureController:Where
pictureServicesimply doesIOUtils.copy(imageStream, outputStream)