title: No Handler found error while implementing the spring MVC
body: <p>I have been trying to run this example project from the web to learn spring mvc but facing the below issue:</p>
  
  <pre><code>Mar 03, 2019 8:47:53 PM org.springframework.web.servlet.PageNotFound noHandlerFound
  WARNING: No mapping found for HTTP request with URI [/springmvcexample/employee-module] in DispatcherServlet with name 'spring'
  </code></pre>
  
  <p>The URL that I am hitting is:
  <a href="http://localhost:8080/springmvcexample/employee-module" rel="nofollow noreferrer">http://localhost:8080/springmvcexample/employee-module</a></p>
  
  <p>Below are the related files:</p>
  
  <p>EmployeeController class</p>
  
  <pre><code>@Controller
  @RequestMapping("/employee-module")
  public class EmployeeController 
  {
      @Autowired
      EmployeeManager manager;
  
      @RequestMapping(value = "/getAllEmployees", method = RequestMethod.GET)
      public String getAllEmployees(Model model)
      {
          model.addAttribute("employees", manager.getAllEmployees());
          return "employeesListDisplay";
      }
  }
  </code></pre>
  
  <p>Web.xml</p>
  
  <pre><code>&lt;web-app id="WebApp_ID" version="2.4" 
      xmlns="http://java.sun.com/xml/ns/j2ee" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
      http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt;
  
      &lt;display-name&gt;Spring Web MVC Hello World Application&lt;/display-name&gt;
  
      &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;/WEB-INF/spring-servlet.xml&lt;/param-value&gt;
      &lt;/context-param&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;init-param&gt;
              &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
              &lt;param-value&gt;&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;spring&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>spring-servlet.xml</p>
  
  <pre><code>&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-3.0.xsd
           http://www.springframework.org/schema/mvc 
         http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
          http://www.springframework.org/schema/context
          http://www.springframework.org/schema/context/spring-context-3.0.xsd"&gt;
  
      &lt;context:component-scan base-package="com.howtodoinjava.demo.*" /&gt;
      &lt;mvc:annotation-driven /&gt;
  
      &lt;bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping" /&gt;
      &lt;bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" /&gt;
  
      &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;property name="prefix" value="/WEB-INF/views/" /&gt;
          &lt;property name="suffix" value=".jsp" /&gt;
      &lt;/bean&gt;
  
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>Can someone please help on the same.</p>
  
  <p>Below is the screenshot of the servers view of the app deployed
  <a href="https://i.stack.imgur.com/XzNO3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XzNO3.jpg" alt="enter image description here"></a></p>