title: Link CSS and Images to Spring MVC maven Projcet
body: <p>I have a Spring project created using maven. The following is my directory structure.</p>
  
  <p><img src="https://i.stack.imgur.com/hZj6O.png" alt="enter image description here"> </p>
  
  <p>I want to add css images to this project. For this, i created a resources folder inside the web-inf directory and placed an image there. To my dispatcher servlet xml, i added 3 lines, pertaining to mvc. One line is in the xmlns:mvc and the other 2 are the last 2 lines in the schema location:</p>
  
  <p>http://www.springframework.org/schema/beans<br>
          <a href="http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" rel="nofollow noreferrer">http://www.springframework.org/schema/beans/spring-beans-3.0.xsd</a>
          <a href="http://www.springframework.org/schema/context" rel="nofollow noreferrer">http://www.springframework.org/schema/context</a> 
          <a href="http://www.springframework.org/schema/context/spring-context-3.0.xsd" rel="nofollow noreferrer">http://www.springframework.org/schema/context/spring-context-3.0.xsd</a>
          <a href="http://www.springframework.org/schema/mvc" rel="nofollow noreferrer">http://www.springframework.org/schema/mvc</a>
      <a href="http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd" rel="nofollow noreferrer">http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd</a>"></p>
  
  <p>The mvc xmlns and xsi locations were not present earlier, i added them so that the following line works:</p>
  
  <pre><code>&lt;mvc:resources location="/resources/**" mapping="/resources"/&gt;
  </code></pre>
  
  <p>When i add the above 3 lines, My project does not work. I get the error:</p>
  
  <pre><code>description The requested resource is not available.
  </code></pre>
  
  <p>If i remove the mvc lines from the beans declaration and run the project w/o images/css the project runs. </p>
  
  <p>Can anyone help me with this? If the above method is not the way to add css and images to a spring mvc project, please point out to the correct way. </p>
  
  <p>Thanks a lot!</p>