Spring mvc @RequestMapping on class level and method level 404 Status
<p>I know that there are lot of posts here with the same problem, but none of them seem to help me, so this will probably be a duplicate.</p>

<p>Im creating a spring mvc application using Maven, i have only one controller with one method. When i put the request mapping annotation only on the class level the application works fine but when i put it on the class level and the method level and i send a request like this: </p>

<p>localhost:8080/myapplication/planification/projet</p>

<p>i get 404 error: HTTP Status 404 - /myapplication/planification/WEB-INF/pages/test.jsp</p>

<p>here is my controller</p>

<pre><code>@Controller
@RequestMapping("/planification")
public class PlanificationController {

 @RequestMapping("/projet")
 public ModelAndView projets (ModelAndView m){

    m.addObject("projets", "All projects");
    m.setViewName("test");

    return m;
 }

}
</code></pre>

<p>mvc-dispatcher-servlet.xml</p>

<pre><code>&lt;beans&gt;

 &lt;context:component-scan base-package="com.smit"/&gt;

 &lt;mvc:annotation-driven/&gt;

 &lt;!-- **** VIEW RESOLVER BEAN **** --&gt;

 &lt;bean id="viewResolver"
    class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt; 

  &lt;property name="prefix"&gt;
        &lt;value&gt;WEB-INF/pages/&lt;/value&gt;
  &lt;/property&gt;

  &lt;property name="suffix"&gt;
        &lt;value&gt;.jsp&lt;/value&gt;
  &lt;/property&gt;

 &lt;/bean&gt;

&lt;/beans&gt;
</code></pre>

<p>web.xml</p>

<pre><code>&lt;web-app&gt;
&lt;servlet&gt;
    &lt;servlet-name&gt;mvc-dispatcher&lt;/servlet-name&gt;
    &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-    class&gt;
&lt;/servlet&gt;

&lt;servlet-mapping&gt;
    &lt;servlet-name&gt;mvc-dispatcher&lt;/servlet-name&gt;
    &lt;url-pattern&gt;/&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;

&lt;listener&gt;
    &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
&lt;/listener&gt;
&lt;context-param&gt;
    &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
    &lt;param-value&gt;
         /WEB-INF/mvc-dispatcher-servlet.xml

    &lt;/param-value&gt;
&lt;/context-param&gt;
&lt;/web-app&gt;
</code></pre>