title: What's wrong with my Spring MVC configuration?
body: <p>I'm trying to setup and learn how to develop web applications with Spring MVC. I've been trying to follow a number of tutorials, but my application doesn't seem to want to work.</p>
  
  <p>Enviro: Eclipse, m2e-wtp, spring, the whole shebang</p>
  
  <p>Context root is BidApp.</p>
  
  <p>I have one controller:</p>
  
  <pre><code>@Controller
  public class AuctionController {    
      @RequestMapping("/hello")
      public ModelAndView helloWorld() {
          String message = "Hello World, Spring 3.0!";
          return new ModelAndView("hello", "message", message);
      }
  }
  </code></pre>
  
  <p>My web.xml in WEB-INF:</p>
  
  <pre><code>&lt;!DOCTYPE web-app PUBLIC
   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
   "http://java.sun.com/dtd/web-app_2_3.dtd" &gt;
  
  &lt;web-app&gt;
      &lt;display-name&gt;BidApp&lt;/display-name&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;dispatcher&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;init-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;/init-param&gt;
      &lt;/servlet&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;dispatcher&lt;/servlet-name&gt;
          &lt;url-pattern&gt;*.*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>And my spring-servlet.xml also in WEB-INF</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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/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;!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure --&gt;
  
      &lt;!-- Scans within the base package of the application for @Components to configure as beans --&gt;
      &lt;!-- @Controller, @Service, @Configuration, etc. --&gt;
      &lt;context:component-scan base-package="com.bidapp.controllers" /&gt;
  
      &lt;!-- Enables the Spring MVC @Controller programming model --&gt;
      &lt;mvc:annotation-driven /&gt;
      &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;property name="prefix" value="/WEB-INF/jsp/" /&gt;
          &lt;property name="suffix" value=".jsp" /&gt;
      &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>My I start the application and navigate to <code>http://localhost:8080/BidApp/hello</code>, it gives me a 404. Are my xml files in the wrong place or am I missing some configuration parameter? Is there a good place I can look at all the available parameters for configuring a spring application. The spring framework reference, unless I'm reading it wrong, isn't helping.</p>
  
  <p>Edit: </p>
  
  <pre><code>Tomcat logs:
  Nov 18, 2012 10:07:35 PM org.apache.catalina.core.AprLifecycleListener init
  INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\php\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\MATLAB\R2010b\runtime\win64;C:\Program Files\MATLAB\R2010b\bin;C:\Users\Soto\Desktop\android-sdk-windows\tools;C:\Program Files (x86)\Common Files\Teleca Shared;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\TortoiseHg\;C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\MinGW\bin;C:\Program Files\nodejs\;C:\Ruby193\bin;C:\Program Files (x86)\SSH Communications Security\SSH Secure Shell;C:\Users\Soto\Desktop\android-sdk-windows\tools;C:\MinGW\bin;C:\Users\Soto\AppData\Roaming\npm\;C:\apache-maven-3.0.4\bin;C:\Program Files\Java\jdk1.7.0_02\bin;;.
  Nov 18, 2012 10:07:35 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
  WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:BidApp' did not find a matching property.
  Nov 18, 2012 10:07:35 PM org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["http-bio-8080"]
  Nov 18, 2012 10:07:35 PM org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
  Nov 18, 2012 10:07:35 PM org.apache.catalina.startup.Catalina load
  INFO: Initialization processed in 594 ms
  Nov 18, 2012 10:07:36 PM org.apache.catalina.core.StandardService startInternal
  INFO: Starting service Catalina
  Nov 18, 2012 10:07:36 PM org.apache.catalina.core.StandardEngine startInternal
  INFO: Starting Servlet Engine: Apache Tomcat/7.0.22
  Nov 18, 2012 10:07:36 PM org.apache.catalina.core.StandardContext checkUnusualURLPattern
  INFO: Suspicious url pattern: "*.*" in context [/BidApp] - see section SRV.11.2 of the Servlet specification
  Nov 18, 2012 10:07:36 PM org.apache.catalina.core.ApplicationContext log
  INFO: Initializing Spring FrameworkServlet 'dispatcher'
  Nov 18, 2012 10:07:36 PM org.springframework.web.servlet.FrameworkServlet initServletBean
  INFO: FrameworkServlet 'dispatcher': initialization started
  Nov 18, 2012 10:07:36 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
  INFO: Refreshing WebApplicationContext for namespace 'dispatcher-servlet': startup date [Sun Nov 18 22:07:36 EST 2012]; root of context hierarchy
  Nov 18, 2012 10:07:36 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
  INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-servlet.xml]
  Nov 18, 2012 10:07:36 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
  INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6ad89088: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.view.InternalResourceViewResolver#0]; root of factory hierarchy
  Nov 18, 2012 10:07:37 PM org.springframework.web.servlet.FrameworkServlet initServletBean
  INFO: FrameworkServlet 'dispatcher': initialization completed in 739 ms
  Nov 18, 2012 10:07:37 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["http-bio-8080"]
  Nov 18, 2012 10:07:37 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["ajp-bio-8009"]
  Nov 18, 2012 10:07:37 PM org.apache.catalina.startup.Catalina start
  INFO: Server startup in 1395 ms
  </code></pre>