title: My InternalResourceViewResolver not working properly
body: <p>I am trying develope a small application using Spring Framework with Annotation but i really not able to recognized what i made mistake that <code>InternalResourceViewResolver</code> class not handling request that is coming from <code>.jsp</code> page. here is my project details.</p>
  
  <blockquote>
    <p>index.jsp</p>
  </blockquote>
  
  <pre><code>&lt;jsp:forward page="login.form" &gt;&lt;/jsp:forward&gt;
  </code></pre>
  
  <blockquote>
    <p>spring-servlet.xml</p>
  </blockquote>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:tx="http://www.springframework.org/schema/tx"
      xmlns:mvc="http://www.springframework.org/schema/mvc"
      xsi:schemaLocation="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.xsd
      http://www.springframework.org/schema/context
      http://www.springframework.org/schema/context/spring-context-4.0.xsd"&gt;
  
      &lt;context:component-scan base-package="com.nody.spring.controller"&gt;&lt;/context:component-scan&gt;
      &lt;context:annotation-config&gt;&lt;/context:annotation-config&gt;
      &lt;!-- Handler Mapping --&gt;
      &lt;bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMappping"&gt;&lt;/bean&gt;
  
      &lt;!-- View Resolver --&gt;
      &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
      &lt;property name="prefix"   value="/"&gt;&lt;/property&gt;
      &lt;property name="suffix"   value=".jsp"&gt;&lt;/property&gt;
      &lt;/bean&gt;
  
      &lt;bean id="jt"  class="org.springframework.jdbc.core.JdbcTemplate"&gt;
      &lt;property name="dataSource"  ref="ds"&gt;&lt;/property&gt;
      &lt;/bean&gt;
  
      &lt;bean id="ds"  class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
      &lt;property name="driverClassName"  value="oracle.jdbc.driver.OracleDriver"&gt;&lt;/property&gt;
      &lt;property name="url"  value="jdbc:oracle:thin:@localhost:1521:xe"&gt;&lt;/property&gt;
      &lt;property name="username"  value="scott"&gt;&lt;/property&gt;
      &lt;property name="password"  value="tiger"&gt;&lt;/property&gt;
      &lt;/bean&gt;
     &lt;/beans&gt;
  </code></pre>
  
  <blockquote>
    <p>LoginController.java</p>
  </blockquote>
  
  <pre><code>package com.nody.spring.controller;
  
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  import org.springframework.web.bind.annotation.RequestParam;
  import org.springframework.web.servlet.ModelAndView;
  
  @Controller
  public class LoginController {
  
          private LoginService loginService;
  
          @Autowired
          public void setLoginService(LoginService loginService) {
              this.loginService = loginService;
          }
  
          @RequestMapping(value="/login.form", method=RequestMethod.GET)
          public ModelAndView getLoginPage()
          {
              return new ModelAndView("login");
          }
  
          @RequestMapping(value="check", method=RequestMethod.POST)
          public ModelAndView checkLogin(@RequestParam("uname")String s1,@RequestParam("pword")String s2)
          {
              boolean b=loginService.check(s1,s2);
              if(b)
                  return new ModelAndView("success");
              else
                  return new ModelAndView("failure");
          }
  
      }
  </code></pre>
  
  <blockquote>
    <p>LoginService.java</p>
  </blockquote>
  
  <pre><code>package com.nody.spring.controller;
  
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.beans.factory.annotation.Qualifier;
  import org.springframework.jdbc.core.JdbcTemplate;
  import org.springframework.stereotype.Repository;
  
  @Repository
  public class LoginService {
  
      private JdbcTemplate jt;
      @Autowired
      @Qualifier("jt")
      public void setJt(JdbcTemplate jt)
      {
          this.jt=jt;
      }
      public boolean check(String s1,String s2)
      {
          @SuppressWarnings("deprecation")
          int i=jt.queryForInt("select count(*) from users where uname=? and pword=?",s1,s2);
          if(i==1)
              return true;
          else
              return false;
  
      }
  
  
  }
  </code></pre>
  
  <blockquote>
    <p>List of jars</p>
  </blockquote>
  
  <pre><code>aspectj-weaver.jar
  atomikos-transactions-api.jar
  atomikos-transactions-jta.jar
  atomikos-util.jar
  commons-logging-api-1.1.1.jar
  javax.transaction-3.1.jar
  jta.jar
  mysql-connector-java-5.1.6.jar
  ojdbc14.jar
  spring-aop-4.1.4.RELEASE.jar
  spring-beans-4.1.4.RELEASE.jar
  spring-context-4.1.4.RELEASE.jar
  spring-context-support-4.1.4.RELEASE.jar
  spring-core-4.1.4.RELEASE.jar
  spring-expression-4.1.4.RELEASE.jar
  spring-jdbc-4.1.4.RELEASE.jar
  spring-tx-4.1.4.RELEASE.jar
  transactions-3.7.0.jar
  transactions-jdbc-3.7.0.jar
  aopalliance.jar
  aspectjrt-1.8.5.jar
  </code></pre>
  
  <blockquote>
    <p>failure.jsp</p>
  </blockquote>
  
  <pre><code>&lt;form action="check.form" method="POST"&gt;
  Username:&lt;input type=text name="uname"&gt;&lt;br&gt;
  Password&lt;input type=password name="pword"&gt;&lt;br&gt;
  &lt;input type=submit value="SUBMIT"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <blockquote>
    <p>success.jsp</p>
  </blockquote>
  
  <pre><code>&lt;h1&gt;Login Success !!!&lt;/h1&gt;
  </code></pre>
  
  <blockquote>
    <p>failure.jsp</p>
  </blockquote>
  
  <pre><code>&lt;h1&gt;Login Success !!!&lt;/h1&gt;
  </code></pre>
  
  <blockquote>
    <p>and Oracle Table name is 'users' with 2 columns 'uname' and 'pword'</p>
  </blockquote>