title: org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI Spring 3
body: <p>Im new to spring mvc, earlier I accessed homepage via root package name "localhost/spring", and I cant find out what i'd  changed that i got this error.
  Web.xml:</p>
  
  <pre><code>    &lt;servlet&gt;
      &lt;servlet-name&gt;appServlet&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/appServlet/servlet-context.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;appServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>Homepage Controller</p>
  
  <pre><code>@Controller
  public class HomeController {
  
  private UserServiceImpl userService;
  
  @Inject
  public HomeController(UserServiceImpl userService)
  {
      this.userService = userService;
  }   
  
  @RequestMapping(value="/")
  public String home(Model model) {
  
      System.out.println("Sdfsd");
  
      model.addAttribute("users", userService.getUsers());
  
      return "home";
  }
  
  }
  </code></pre>
  
  <p>servlet-context.xml:</p>
  
  <pre><code>    &lt;annotation-driven /&gt;
  
  
  &lt;resources mapping="/resources/**" location="/resources/" /&gt;
  
  &lt;context:component-scan base-package="by.mvc.dao" /&gt;
  
  &lt;beans:bean id="dataSource"
       class="org.apache.commons.dbcp.BasicDataSource"&gt; 
      &lt;beans:property name="driverClassName" value="org.hsqldb.jdbcDriver" /&gt;
      &lt;beans:property name="url" value="jdbc:hsqldb:hsql://localhost/user_db" /&gt; 
      &lt;beans:property name="username" value="root" /&gt;
      &lt;beans:property name="password" value="root" /&gt;
      &lt;beans:property name="initialSize" value="5" /&gt;
      &lt;beans:property name="maxActive" value="10" /&gt;
  &lt;/beans:bean&gt;
  
  &lt;beans:bean id="sessionFactory"
      class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"&gt;
      &lt;beans:property name="dataSource" ref="dataSource" /&gt;
      &lt;beans:property name="packagesToScan" value="by.mvc.dao" /&gt;
      &lt;beans:property name="hibernateProperties"&gt; 
          &lt;beans:props&gt; 
              &lt;beans:prop key="hibernate.dialect"&gt;org.hibernate.dialect.MySQLDialect&lt;/beans:prop&gt; 
          &lt;/beans:props&gt; 
      &lt;/beans:property&gt; 
  &lt;/beans:bean&gt;
  
  &lt;beans:bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager"&gt;
      &lt;beans:property name="sessionFactory" ref="sessionFactory"/&gt;
  &lt;/beans:bean&gt;
  
  &lt;beans:bean class="org.springframework.web.servlet.view.tiles2.TilesViewResolver"/&gt;
  
  &lt;beans:bean class="org.springframework.web.servlet.view.tiles2.TilesConfigurer"&gt;
      &lt;beans:property name="definitions"&gt;
          &lt;beans:list&gt;
              &lt;beans:value&gt;/WEB-INF/views/views.xml&lt;/beans:value&gt;
          &lt;/beans:list&gt;
      &lt;/beans:property&gt;
  &lt;/beans:bean&gt;
  </code></pre>
  
  <p>Any ideas? thanks</p>