View RSS Feed

Spring Framework

SpringSource Spring Framework tutorials and examples. Focusing on Spring 3 and above.

  1. Serving Static Content in Spring

    by , 11-27-2011 at 11:06 PM
    If you are concern you that DispatcherServlet will be handling static content requests, Spring has features that can help you to deal with this. Spring’s mvc namespace includes a <mvc:resources> element that handles requests for static content for you. In the following example, I show you how you can create an xml file that the DispatcherServlet can use to create an application context.

    Java Code:
    <?xml version="1.0" encoding="UTF-8"?> 
    <beans xmlns=""

    Updated 11-30-2011 at 01:59 PM by Spring Framework