title: Spring MVC Controllers mapping not registered
body: <p>I'm making some tests with spring mvc this days and I have one problem. For a basic application to test with I choose this tutorial:
  <a href="http://loianegroner.com/2010/09/extjs-spring-mvc-3-and-hibernate-3-5-crud-datagrid-example/" rel="nofollow">http://loianegroner.com/2010/09/extjs-spring-mvc-3-and-hibernate-3-5-crud-datagrid-example/</a>
  I've downloaded the example and everything works as expected. The problem is when I try to add another Controller. It seems that file I'm adding is not scanned. </p>
  
  <p>My web.xml file:</p>
  
  <pre><code>&lt;servlet&gt;
      &lt;servlet-name&gt;extjs-crud-grid-spring-hibernate&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/app-config.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;extjs-crud-grid-spring-hibernate&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.action&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>/WEB-INF/spring/app-config.xml:</p>
  
  <pre><code>&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/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
      http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"&gt;
  
  &lt;!-- Scans the classpath of this application for @Components to deploy as beans --&gt;
  &lt;context:component-scan base-package="com.loiane" /&gt;
  
  &lt;!-- Configures the @Controller programming model --&gt;
  &lt;mvc:annotation-driven /&gt;
  
  &lt;!-- misc --&gt;
  &lt;bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
      &lt;property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/&gt;
      &lt;property name="suffix" value=".jsp"/&gt;
  &lt;/bean&gt;
  
  &lt;!-- Configures Hibernate - Database Config --&gt;
  &lt;import resource="db-config.xml" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>as you can see there are context:component-scan and mvc:annotation-driven tags which should tell spring to scan all the classes in com.lione package for @Controller annotation. But when I try to add my own controller to this application it seems it's not processed. Only first controller is mapped.</p>
  
  <p>Here is my controller code</p>
  
  <pre><code>    package com.loiane.web;
  
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.servlet.ModelAndView;
  
  
  @Controller
  public class HelloController {
  
      @RequestMapping("/helloWorld.action")
      public ModelAndView helloWorld() {
          ModelAndView mav = new ModelAndView();
          mav.setViewName("helloWorld");
          mav.addObject("message", "Hello World!");
          return mav;
      }
  }
  </code></pre>
  
  <p>After running this in eclipse console log I've got </p>
  
  <pre><code>INFO: Mapped URL path [/contact/delete.action] onto handler 'contactController'
  INFO: Mapped URL path [/contact/create.action] onto handler 'contactController'
  INFO: Mapped URL path [/contact/update.action] onto handler 'contactController'
  INFO: Mapped URL path [/contact/view.action] onto handler 'contactController'
  </code></pre>
  
  <p>but /helloWorld.action is missing</p>
  
  <p>Thanks in advance</p>