title: org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI
body: <p>I referred to many posts but still I was unable to solve this problem.</p>
  
  <p><img src="https://i.stack.imgur.com/JADvi.gif" alt="enter image description here"></p>
  
  <p>I have tried putting this css folder in WEB-INF and within views folder as well.<br>
  But still the styles are not reflected in the view page.</p>
  
  <p>Here is my servlet-context.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans:beans xmlns="http://www.springframework.org/schema/mvc"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:beans="http://www.springframework.org/schema/beans"
      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.0.xsd
          http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"&gt;
  
      &lt;resources mapping="/resources/**" location="/resources/" /&gt;
  
      &lt;beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;beans:property name="prefix" value="/WEB-INF/views/" /&gt;
          &lt;beans:property name="suffix" value=".jsp" /&gt;
      &lt;/beans:bean&gt;
  
      &lt;context:component-scan base-package="ctc.event.control" /&gt;
  
  &lt;/beans:beans&gt;
  </code></pre>
  
  <p>This is my web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt;
  
      &lt;!-- The definition of the Root Spring Container shared by all Servlets and Filters --&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;/WEB-INF/spring/root-context.xml&lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;!-- Creates the Spring Container shared by all Servlets and Filters --&gt;
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;!-- Processes application requests --&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;appServlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
              &lt;param-value&gt;/WEB-INF/spring/appServlet/servlet-context.xml&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;appServlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>This is my style sheet ExpenseDetailsStyles.css</p>
  
  <pre><code>#ItemDiv1_Table1 {
      border: 1px solid black;
  }
  
  #ItemDiv1Table2 {
      width: 20%;
      float: right;
      font-size:30px;
  }
  </code></pre>
  
  <p>and my view page.</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
  &lt;%@ include file="TagIncludes.jsp" %&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;title&gt;Expense Details&lt;/title&gt;
  &lt;link href='&lt;c:url value="/resources/css/ExpenseDetailsStyles.css" /&gt;' rel="stylesheet" type="text/css" media="screen" /&gt;
  &lt;script type='text/javascript' src="../js/jquery-1.9.0.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form:form name="ExpenseDetails" method="Post"
          action="ExpenseDetailsForm.html"&gt;
          &lt;div id="ItemDiv1"&gt;
              &lt;table&gt;
                  &lt;tr&gt;
                      &lt;td&gt;
                          &lt;table id="ItemDiv1_Table1"&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;Item&lt;/td&gt;
                                  &lt;td&gt;&lt;input type="text" name="Item1" id="Item1" required /&gt;&lt;/td&gt;
                              &lt;/tr&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;Expense in Rs&lt;/td&gt;
                                  &lt;td&gt;&lt;input type="text" name="ItemValue1" id="ItemValue1" &gt;&lt;/td&gt;
                              &lt;/tr&gt;
                          &lt;/table&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;table id="ItemDiv1_Table2"&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;Edit&lt;/td&gt;
                              &lt;/tr&gt;
                          &lt;/table&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
          &lt;/div&gt;
      &lt;/form:form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here is the controller  </p>
  
  <pre><code>@Controller
  public class ExpenseFormController {
  
      @RequestMapping(value = "/ExpenseDetailsForm.html", method = RequestMethod.GET)
      public String openForm() {
          return "ExpenseDetailsForm";
  
      }
  
      @RequestMapping(value = "/ExpenseDetailsForm.html", method = RequestMethod.POST)
      public String submitForm() {
          return null;
  
      }
  }
  </code></pre>
  
  <p>stacktrace is not an error but a warning.</p>
  
  <blockquote>
    <p>WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/Calculator/<code>&lt;c:url value="css/ExpenseDetailsStyles.css" /&gt;</code>] in DispatcherServlet with name 'appServlet'</p>
  </blockquote>
  
  <p>I think there is some problem with my uri in the view page and I tried changing it in many different ways.
  Can anyone please help me correct the uri and reflect the styles on the view page?<br>
  Please comment if any other information pertaining this, is needed.</p>