title: CSS and other resource files are not getting mapped in Spring MVC project
body: <p>I have created a page with an external CSS file. I am unable to mapp my css file with my jsp page.The same code is working fine in netbeans but causing issue in Sprint Tool Suite(eclipse).</p>
  
  <p><a href="https://i.stack.imgur.com/XYoIG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XYoIG.png" alt="Project Structure"></a></p>
  
  <p>web.xml</p>
  
  <pre><code>    &lt;!DOCTYPE web-app PUBLIC
   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
   "http://java.sun.com/dtd/web-app_2_3.dtd" &gt;
  
  &lt;web-app&gt;
    &lt;display-name&gt;Archetype Created Web Application&lt;/display-name&gt;
  
    &lt;servlet&gt;
      &lt;servlet-name&gt;sk&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.springfamework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;sk&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Dispatcher-servlet.xml</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:mvc="http://www.springframework.org/schema/mvc"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd
          http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd"&gt;
  
  
  
  
      &lt;context:annotation-config&gt;&lt;/context:annotation-config&gt;
      &lt;mvc:resources mapping="/resources/**" location="/resources/" /&gt;
      &lt;context:component-scan base-package="com.sk"&gt;&lt;/context:component-scan&gt;
  
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>JSP page</p>
  
  <pre><code>    &lt;%@page contentType="text/html" language="java" pageEncoding="UTF-8"%&gt;
  
  
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Contact and Feedback&lt;/title&gt;
  
      &lt;link rel="stylesheet" href="resources/css/style.css" media="all" type="text/css"&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;div id="background"&gt;
          &lt;div id="page"&gt;
              &lt;div id="header"&gt;
                  &lt;div id="logo"&gt;
                      &lt;a href="index.html"&gt;&lt;img src="images/logo.png" alt="LOGO" height="112" width="118"&gt;&lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div id="navigation"&gt;
                      &lt;ul&gt;
                          &lt;li&gt;
                              &lt;a href="index.html"&gt;Home&lt;/a&gt;
                          &lt;/li&gt;
                          &lt;li&gt;
                              &lt;a href="about.html"&gt;About&lt;/a&gt;
                          &lt;/li&gt;
                          &lt;li&gt;
                              &lt;a href="videos.html"&gt;Videos&lt;/a&gt;
                          &lt;/li&gt;
                          &lt;li&gt;
                              &lt;a href="images.html"&gt;Images&lt;/a&gt;
                          &lt;/li&gt;
                          &lt;li&gt;
                              &lt;a href="downlaods.html"&gt;Downloads&lt;/a&gt;
                          &lt;/li&gt;
                          &lt;li&gt;
                              &lt;a href="news.html"&gt;News&lt;/a&gt;
                          &lt;/li&gt;
                          &lt;li class="selected"&gt;
                              &lt;a href="contact.html"&gt;Contact&lt;/a&gt;
                          &lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div id="contents"&gt;
                  &lt;div class="box"&gt;
                      &lt;div&gt;
                          &lt;div id="contact" class="body"&gt;
                              &lt;h1&gt;Contact&lt;/h1&gt;
                              &lt;form action="addfeedback" method="post"&gt;
                                  &lt;table&gt;
                                      &lt;tbody&gt;
                                          &lt;tr&gt;
                                              &lt;td&gt;Name:&lt;/td&gt;
                                              &lt;td&gt;&lt;input type="text" value="" name="name" class="txtfield"&gt;&lt;/td&gt;
                                          &lt;/tr&gt; &lt;tr&gt;
                                              &lt;td&gt;Email:&lt;/td&gt;
                                              &lt;td&gt;&lt;input type="text" value="" name="mail" class="txtfield"&gt;&lt;/td&gt;
                                          &lt;/tr&gt; &lt;tr&gt;
                                              &lt;td&gt;Subject:&lt;/td&gt;
                                              &lt;td&gt;&lt;input type="text" value="" name="sub" class="txtfield"&gt;&lt;/td&gt;
                                          &lt;/tr&gt; &lt;tr&gt;
                                              &lt;td class="txtarea"&gt;Message:&lt;/td&gt;
                                              &lt;td&gt;&lt;textarea name="msg"&gt;&lt;/textarea&gt;&lt;/td&gt;
                                          &lt;/tr&gt; &lt;tr&gt;
                                              &lt;td&gt;&lt;/td&gt;
                                              &lt;td&gt;&lt;input type="submit" value="" class="btn"&gt;&lt;/td&gt;
                                          &lt;/tr&gt;
                                      &lt;/tbody&gt;
                                  &lt;/table&gt;
                              &lt;/form&gt;
                              &lt;h2&gt;Spring MVC Test Page&lt;/h2&gt;
                              &lt;p&gt;
                                  &lt;span&gt;Address:&lt;/span&gt; Integral University Boys Hostel
                              &lt;/p&gt;
                              &lt;p&gt;
                                  &lt;span&gt;Contact Number:&lt;/span&gt; +91-9479711997
                              &lt;/p&gt;
                              &lt;p&gt;
                                  &lt;span&gt;E-Mail ID&lt;/span&gt; shahbaz275817@yahoo.com
                              &lt;/p&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div id="footer"&gt;
              &lt;div&gt;
                  &lt;ul class="navigation"&gt;
                      &lt;li&gt;
                          &lt;a href="index.html"&gt;Home&lt;/a&gt;
                      &lt;/li&gt;
                      &lt;li&gt;
                          &lt;a href="about.html"&gt;About&lt;/a&gt;
                      &lt;/li&gt;
                      &lt;li&gt;
                          &lt;a href="rooms.html"&gt;Videos&lt;/a&gt;
                      &lt;/li&gt;
                      &lt;li&gt;
                          &lt;a href="dives.html"&gt;Images&lt;/a&gt;
                      &lt;/li&gt;
                      &lt;li&gt;
                          &lt;a href="foods.html"&gt;Downloads&lt;/a&gt;
                      &lt;/li&gt;
                      &lt;li&gt;
                          &lt;a href="news.html"&gt;News&lt;/a&gt;
                      &lt;/li&gt;
                      &lt;li class="active"&gt;
                          &lt;a href="contact.html"&gt;Contact&lt;/a&gt;
                      &lt;/li&gt;
                  &lt;/ul&gt;
                  &lt;div id="connect"&gt;
                      &lt;a href="http://pinterest.com/fwtemplates/" target="_blank" class="pinterest"&gt;&lt;/a&gt; &lt;a href="http://freewebsitetemplates.com/go/facebook/" target="_blank" class="facebook"&gt;&lt;/a&gt; &lt;a href="http://freewebsitetemplates.com/go/twitter/" target="_blank" class="twitter"&gt;&lt;/a&gt; &lt;a href="http://freewebsitetemplates.com/go/googleplus/" target="_blank" class="googleplus"&gt;&lt;/a&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;p&gt;
                  © 2017 by SHAHBAZ KHAN. All Rights Reserved
              &lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>