June 2014
Beginner to intermediate
304 pages
7h 25m
English
Let's see how we can serve static images with Spring MVC:
src/main/webapp/resources/images/ directory; I have used three product images, namely P1234.png, P1235.png, and P1236.png.DispatcherServlet-context.xml file:<mvc:resources location="/resources/" mapping="/resource/**"/>
http://localhost:8080/webstore/resource/images/P1234.png (change the image name in the URL based on the images you placed in step 1).What just happened was simple; in step 1, we placed some image files under the src/main/webapp/resources/images/ ...
Read now
Unlock full access