I am trying to use static resources using the new mvc tag library introduced in spring v3.0.4.
My spring config looks like this:
<mvc:resources mapping="/scripts/**" location="/scripts/" />
<mvc:resources mapping="/styles/**" location="/styles/" />
<mvc:resources mapping="/images/**" location="/images/" />
But it sends a request for / styles / ** to the DispatcherController. I get a blank page with this magazine.
2011-03-05 21:05:11,923 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <DispatcherServlet with name 'template' processing GET r
equest for [/template/styles/admin/struts-menu/menuExpandable.css]>
2011-03-05 21:05:11,923 DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - <Matching patterns for request [/styles/ad
min/struts-menu/menuExpandable.css] are [/styles/**]>
2011-03-05 21:05:11,923 DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - <URI Template variables for request [/styl
es/admin/struts-menu/menuExpandable.css] are {}>
2011-03-05 21:05:11,923 DEBUG [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] - <Mapping [/styles/admin/struts-menu/menuEx
pandable.css] to HandlerExecutionChain with handler [org.springframework.web.servlet.resource.ResourceHttpRequestHandler@1ce0390] and 3 inte
rceptors>
2011-03-05 21:05:11,923 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Last-Modified value for [/template/styles/admin/struts-
menu/menuExpandable.css] is: -1>
2011-03-05 21:05:11,923 DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - <Trying relative path [admin/struts-me
nu/menuExpandable.css] against base location: ServletContext resource [/styles/]>
2011-03-05 21:05:11,923 DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - <Found matching resource: ServletConte
xt resource [/styles/admin/struts-menu/menuExpandable.css]>
2011-03-05 21:05:11,923 DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - <Determined media type [text/css] for
ServletContext resource [/styles/admin/struts-menu/menuExpandable.css]>
2011-03-05 21:05:11,923 DEBUG [org.springframework.web.servlet.resource.ResourceHttpRequestHandler] - <Resource not modified - returning 304
>
2011-03-05 21:05:11,923 DEBUG [com......template.web.admin.interceptors.SideMenuAdminInterceptorV2] - <Entering postHandle()>
2011-03-05 21:05:11,923 INFO [com.....template.web.admin.interceptors.SideMenuAdminInterceptorV2] - <ServletPath : /styles/admin/str
uts-menu/menuExpandable.css, ContextPath : /template, PathTranslated : null>
2011-03-05 21:05:11,923 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Null ModelAndView returned to DispatcherServlet with na
me 'template': assuming HandlerAdapter completed request handling>
2011-03-05 21:05:11,923 DEBUG [org.springframework.web.servlet.DispatcherServlet] - <Successfully completed request>
source
share