title: No mapping found for HTTP request with URI
body: <p>I am creating a simple web app.</p>
  
  <p>Here is my directory structure:</p>
  
  <p><img src="https://i.stack.imgur.com/8vIF4.png" alt="enter image description here"></p>
  
  <p>Here is what the javascript code in the jsp looks like:</p>
  
  <pre><code>&lt;script type="text/javascript" src="JS/jquery-1.4.2.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>This is the web.xml file:</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;dispatcher&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;dispatcher&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p></p>
  
  <p>And lastly this is the dispatcher-servlet.xml file:</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:mvc="http://www.springframework.org/schema/mvc"
  xmlns:context="http://www.springframework.org/schema/context"
  xsi:schemaLocation="http://www.springframework.org/schema/mvc
  http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
  http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
  http://www.springframework.org/schema/context
  http://www.springframework.org/schema/context/spring-context-3.1.xsd"&gt;
  
  &lt;mvc:resources mapping="/resources/**" location="/resources/" /&gt;
  &lt;mvc:resources mapping="/js/**" location="/js/" /&gt;
  &lt;mvc:annotation-driven /&gt;
  &lt;context:component-scan base-package="com.fdm.controllers" /&gt;
  
  &lt;bean
      class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
      &lt;property name="viewClass"
          value="org.springframework.web.servlet.view.JstlView" /&gt;
      &lt;property name="prefix" value="/WEB-INF/views/" /&gt;
      &lt;property name="suffix" value=".jsp" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p></p>
  
  <p>I keep on getting the following error:</p>
  
  <pre><code>WARNING: No mapping found for HTTP request with URI [/SpringMVCExample/JS/jquery-1.4.2.js] in DispatcherServlet with name 'dispatcher'
  </code></pre>
  
  <p>I have looked at various questions regarding this but I am still not able to resolve this. </p>