title: Problems with navigation from jsp to controller
body: <p>I can't navigate to my controller from the JSP. What am I missing?
  I'm having an error status 404.</p>
  
  <p>This is my index.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="ISO-8859-1"&gt;
  &lt;title&gt;WELCOME PAGE&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;h1&gt;WELCOME TO NUTS &lt;/h1&gt;
  &lt;br/&gt;
  &lt;form action="remember.html"&gt;
  
      &lt;input type="submit" value="GET STARTED"&gt; 
  &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is my controller -----------------------------------------------</p>
  
  <pre><code>@Controller
  public class ProductController {
  
  
  
       @RequestMapping(value = "/remember")
        public String list(Model model) {
           ServiceFacade facade = new ServiceFacadeImpl();
           List&lt;Product&gt; products = facade.getAllProducts();
           model.addAttribute("products", products);
           return "/jsp/LoginPage";
       }
  
  
  
  }
  </code></pre>
  
  <p>This is the web.xml--------------------------------------------------</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://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"&gt;
        &lt;display-name&gt;NutsAboutCandyWebProject&lt;/display-name&gt;
        &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
          &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
        &lt;/welcome-file-list&gt;
  
            &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/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;/web-app&gt;
  </code></pre>
  
  <p>This is my servlet-context.xml ----------------------------------</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:beans="http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
      http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
      http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd"&gt;
  
    &lt;!-- Enable @Controller annotation support --&gt;
    &lt;mvc:annotation-driven /&gt;
  
    &lt;!-- Map simple view name such as "test" into /WEB-INF/test.jsp --&gt;
    &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
      &lt;property name="prefix" value="/jsp" /&gt;
      &lt;property name="suffix" value=".jsp" /&gt;
    &lt;/bean&gt;
  
    &lt;!-- Scan classpath for annotations (eg: @Service, @Repository etc) --&gt;
    &lt;context:component-scan base-package="com.nutsaboutcandywebproject.controller"/&gt;
  
    &lt;!-- JDBC Data Source. It is assumed you have MySQL running on localhost port 3306 with 
         username root and blank password. Change below if it's not the case --&gt;
    &lt;bean id="myDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"&gt;
      &lt;property name="driverClassName" value="com.mysql.jdbc.Driver"/&gt;
      &lt;property name="url" value="jdbc:mysql://localhost:3306/db_nutsaboutcandy"/&gt;
      &lt;property name="username" value="root"/&gt;
      &lt;property name="password" value=""/&gt;
      &lt;property name="validationQuery" value="SELECT 1"/&gt;
    &lt;/bean&gt;
  
    &lt;!-- Hibernate Session Factory --&gt;
    &lt;bean id="mySessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"&gt;
      &lt;property name="dataSource" ref="myDataSource"/&gt;
      &lt;property name="packagesToScan"&gt;
        &lt;array&gt;
          &lt;value&gt;com.nutsaboutcandywebproject.model&lt;/value&gt;
        &lt;/array&gt;
      &lt;/property&gt;
      &lt;property name="hibernateProperties"&gt;
        &lt;value&gt;
          hibernate.dialect=org.hibernate.dialect.MySQLDialect
        &lt;/value&gt;
      &lt;/property&gt;
    &lt;/bean&gt;
  
    &lt;!-- Hibernate Transaction Manager --&gt;
    &lt;!-- &lt;bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager"&gt;
      &lt;property name="sessionFactory" ref="mySessionFactory"/&gt;
    &lt;/bean&gt; --&gt;
  
    &lt;!-- Activates annotation based transaction management --&gt;
    &lt;!-- &lt;tx:annotation-driven transaction-manager="transactionManager"/&gt; --&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>EDIT 1:</p>
  
  <p>web.xml configuration</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://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"&gt;
    &lt;display-name&gt;NutsAboutCandyWebProject&lt;/display-name&gt;
  
    &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/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;
  
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>servlet-context.xml</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:beans="http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
      http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
      http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd"&gt;
  
    &lt;!-- Enable @Controller annotation support --&gt;
    &lt;mvc:annotation-driven /&gt;
  
    &lt;!-- Map simple view name such as "test" into /WEB-INF/test.jsp --&gt;
    &lt;beans:bean   class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;      
          &lt;beans:property name="prefix" value="/" /&gt;      
          &lt;beans:property name="suffix" value=".jsp" /&gt;   
    &lt;/beans:bean&gt;
  
    &lt;!-- Scan classpath for annotations (eg: @Service, @Repository etc) --&gt;
    &lt;context:component-scan base-package="com.nutsaboutcandywebproject.controller"/&gt;
  
    &lt;!-- JDBC Data Source. It is assumed you have MySQL running on localhost port 3306 with 
         username root and blank password. Change below if it's not the case --&gt;
    &lt;bean id="myDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"&gt;
      &lt;property name="driverClassName" value="com.mysql.jdbc.Driver"/&gt;
      &lt;property name="url" value="jdbc:mysql://localhost:3306/db_nutsaboutcandy"/&gt;
      &lt;property name="username" value="root"/&gt;
      &lt;property name="password" value=""/&gt;
      &lt;property name="validationQuery" value="SELECT 1"/&gt;
    &lt;/bean&gt;
  
    &lt;!-- Hibernate Session Factory --&gt;
    &lt;bean id="mySessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"&gt;
      &lt;property name="dataSource" ref="myDataSource"/&gt;
      &lt;property name="packagesToScan"&gt;
        &lt;array&gt;
          &lt;value&gt;com.nutsaboutcandywebproject.model&lt;/value&gt;
        &lt;/array&gt;
      &lt;/property&gt;
      &lt;property name="hibernateProperties"&gt;
        &lt;value&gt;
          hibernate.dialect=org.hibernate.dialect.MySQLDialect
        &lt;/value&gt;
      &lt;/property&gt;
    &lt;/bean&gt;
  
    &lt;!-- Hibernate Transaction Manager --&gt;
    &lt;!--  &lt;bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager"&gt;
      &lt;property name="sessionFactory" ref="mySessionFactory"/&gt;
    &lt;/bean&gt;  --&gt;
  
    &lt;!-- Activates annotation based transaction management --&gt;
    &lt;!--  &lt;tx:annotation-driven transaction-manager="transactionManager"/&gt;  --&gt;
  &lt;/beans&gt; 
  </code></pre>