Hi,
I'm using Spring 3.0.5. I have a folder "static" with static assets at the root of my WAR file (at the same level as WEB-INF). I'm trying to map all requests of the form "/context-path/static/" to this directory, but not having success (getting 404s). Here is what I have ...
My logs show that the mapping is being found, but the file is not. Any ideas how I can troubleshoot this further? - DaveCode:<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.springframework.org/schema/beans" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"> <mvc:resources mapping="/static/**" location="/static/"/> <mvc:annotation-driven/>
Logs ...
Code:2011-07-07 10:11:57,865 [http-8080-2] DEBUG org.springframework.web.servlet.DispatcherServlet - DispatcherServlet with name 'dispatcher' processing GET request for [/leadsmonitor/static/css/reset.css] 2011-07-07 10:11:57,866 [http-8080-2] DEBUG org.springframework.web.servlet.handler.SimpleUrlHandlerMapping - Matching patterns for request [/static/css/reset.css] are [/static/**] 2011-07-07 10:11:57,866 [http-8080-2] DEBUG org.springframework.web.servlet.handler.SimpleUrlHandlerMapping - URI Template variables for request [/static/css/reset.css] are {} 2011-07-07 10:11:57,866 [http-8080-2] DEBUG org.springframework.web.servlet.handler.SimpleUrlHandlerMapping - Mapping [/static/css/reset.css] to HandlerExecutionChain with handler [org.springframework.web.servlet.resource.ResourceHttpRequestHandler@4c7e9bed] and 2 interceptors 2011-07-07 10:11:57,866 [http-8080-2] DEBUG org.springframework.web.servlet.DispatcherServlet - Last-Modified value for [/leadsmonitor/static/css/reset.css] is: -1 2011-07-07 10:11:57,866 [http-8080-2] DEBUG org.springframework.web.servlet.resource.ResourceHttpRequestHandler - Trying relative path [css/reset.css] against base location: class path resource [static/] 2011-07-07 10:11:57,866 [http-80


Reply With Quote