title: How to solve no mapping error in springMVC?
body: <p>I know there is already someone asked the question but I don't get any solution so please help me
  When i use @ResponseBody is work porfact but when i try to return i view it not working properly
  I practice simple spring web app some reason I can't able to mapped a view </p>
  
  <p><strong>Error</strong> </p>
  
  <blockquote>
    <p>Dec 16, 2019 11:25:54 PM org.springframework.web.servlet.DispatcherServlet noHandlerFound
    WARNING: No mapping for GET /SpringMVC/WebContent/WEB-INF/View/cricket.jsp</p>
  </blockquote>
  
  <p><strong>Controller</strong></p>
  
  <p><strong>SonController.java</strong></p>
  
  <pre><code>package com.controller;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  import org.springframework.web.bind.annotation.ResponseBody;
  import org.springframework.web.servlet.config.annotation.EnableWebMvc;
  @EnableWebMvc
  @Controller
  public class SonController {
  
      /*@ResponseBoady is need when we just return string  */
      @RequestMapping(path = "/cricket")
      public String son() {
          return "cricket";
      }
  
  }
  
  </code></pre>
  
  <p><strong>FrontController-servlet.xml</strong></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:jdbc="http://www.springframework.org/schema/jdbc"
      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/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.3.xsd
          http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd"&gt;
  &lt;mvc:annotation-driven&gt;&lt;/mvc:annotation-driven&gt;
  &lt;context:annotation-config&gt;&lt;/context:annotation-config&gt;
  &lt;context:component-scan base-package="com.controller"&gt;&lt;/context:component-scan&gt;
  &lt;bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
      &lt;property name="prefix" value="/WEB-INF/View/"/&gt;
      &lt;property name="suffix" value=".jsp"/&gt;
  &lt;/bean&gt;
  
  &lt;/beans&gt;
  
  </code></pre>
  
  <p><strong>web.xml(DispatcherServlet)</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" version="4.0"&gt;
    &lt;display-name&gt;SpringMVC&lt;/display-name&gt;
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.jsp&lt;/welcome-file&gt;
  
    &lt;/welcome-file-list&gt;
    &lt;absolute-ordering&gt;&lt;/absolute-ordering&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;FrontController&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;FrontController&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p><strong>cricket.jsp(View)</strong></p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="ISO-8859-1"&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;h1&gt;Sachin is GOAT of Cricket&lt;/h1&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>