title: Spring <mvc:resources mapping="/css/**" location="/css/" /> doesn't work
body: <p>Hi mapping css doesn't work.</p>
  <p>This is my config:</p>
  <p>spring-servlet.xml:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
      
      &lt;context:component-scan base-package=&quot;spring.controllers&quot; /&gt;
      
      &lt;bean id=&quot;viewResolver&quot; class=&quot;org.springframework.web.servlet.view.InternalResourceViewResolver&quot;&gt;
         &lt;property name=&quot;viewClass&quot; value=&quot;org.springframework.web.servlet.view.JstlView&quot; /&gt;
         &lt;property name=&quot;prefix&quot; value=&quot;/WEB-INF/jsp/content/&quot; /&gt;
         &lt;property name=&quot;suffix&quot; value=&quot;.jsp&quot; /&gt;
      &lt;/bean&gt;
      
      &lt;context:component-scan base-package=&quot;it.jsoftware.jacciseweb.controllers&quot;&gt;&lt;/context:component-scan&gt;
      &lt;mvc:annotation-driven /&gt;
  
      &lt;bean class=&quot;org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping&quot; /&gt;
      &lt;mvc:resources mapping=&quot;/css/**&quot; location=&quot;/css/&quot; /&gt;
      &lt;mvc:resources mapping=&quot;/images/**&quot; location=&quot;/images/&quot; /&gt;
      &lt;mvc:resources mapping=&quot;/js/**&quot; location=&quot;/js/&quot; /&gt;  
      
  </code></pre>
  <p>web.xml:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  
    &lt;display-name&gt;JewishProjectT&lt;/display-name&gt;
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.jsp&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;spring&lt;/servlet-name&gt;
      &lt;servlet-class&gt;
          org.springframework.web.servlet.DispatcherServlet
      &lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;spring&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  </code></pre>
  <p>and my heder file:</p>
  <pre><code>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;
          &lt;c:choose&gt;
              &lt;c:when test=&quot;${sessionScope['org.springframework.web.servlet.i18n.SessionLocaleResolver.LOCALE'] eq 'i18en'}&quot;&gt;
                  &lt;c:set var=&quot;approach&quot; value=&quot;left&quot; scope=&quot;page&quot;&gt;&lt;/c:set&gt;
              &lt;/c:when&gt;
              &lt;c:when test=&quot;${sessionScope['org.springframework.web.servlet.i18n.SessionLocaleResolver.LOCALE'] eq 'i18ru'}&quot;&gt;
                  &lt;c:set var=&quot;approach&quot; value=&quot;left&quot; scope=&quot;page&quot;&gt;&lt;/c:set&gt;
              &lt;/c:when&gt;
              &lt;c:when test=&quot;${sessionScope['org.springframework.web.servlet.i18n.SessionLocaleResolver.LOCALE'] eq 'i18he'}&quot;&gt;
                  &lt;c:set var=&quot;approach&quot; value=&quot;right&quot; scope=&quot;page&quot;&gt;&lt;/c:set&gt;
              &lt;/c:when&gt;
              &lt;c:otherwise&gt;
                  &lt;c:set var=&quot;approach&quot; value=&quot;left&quot;&gt;&lt;/c:set&gt;
              &lt;/c:otherwise&gt;
          &lt;/c:choose&gt;
          &lt;link rel=&quot;stylesheet&quot; media=&quot;all&quot; type=&quot;text/css&quot; href=&quot;/css/common.css&quot;&gt;
          &lt;link rel=&quot;stylesheet&quot; media=&quot;all&quot; type=&quot;text/css&quot; href=&quot;/css/lavamenu.css&quot;&gt;
          &lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;&gt;&lt;/script&gt;
          &lt;script type=&quot;text/javascript&quot; src=&quot;/js/&lt;c:out value=&quot;${approach}&quot;/&gt;/lavalamp.js&quot;&gt;&lt;/script&gt;
          &lt;title&gt;${title}&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div id=&quot;main&quot;&gt;
  </code></pre>
  <p>in chrome it shows:</p>
  <blockquote>
  <p>/js/left/lavalamp.js 404 (Not Found) 0:19 GET</p>
  <p>/css/common.css 404 (Not Found) 0:17 GET</p>
  <p>/css/lavamenu.css 404 (Not Found)</p>
  </blockquote>
  <p>How to correctly configure paths to css/images/js?</p>
  <p>P.S. I excluded all links which starts with http:\\ , because rules of stackoverflow do not permit me post them as I am beginner.</p>