title: Unable to redirect to a jsp page using Model and view in Spring
body: <p>Hi i want to redirect to a jsp page using Model and view but not able to get that page.Below is the code can any one help me on this?</p>
  
  <pre><code>public ModelAndView login(HttpServletRequest request,
          HttpServletResponse response) throws GridException {
      ModelAndView mv = new ModelAndView("json view");
      Map map = new HashMap();
      GridMappingVO gridMappingVO=new GridMappingVO();
      String users = request.getParameter("username");
      String passwrd = request.getParameter("password");
      gridMappingVO.setUser(users);
      gridMappingVO.setPass(passwrd);
      List&lt;GridMappingVO&gt; searchList= gridMappingFacade.validate(gridMappingVO);
      if(users.equals(searchList.get(0).getUser()) &amp;&amp; passwrd.equals(searchList.get(0).getPass())){
          System.out.println("validation succesfull");
          mv = new ModelAndView("searchResults");
          mv.addObject("searchList", searchList);
  
      }
      else{
          List&lt;String&gt; list = new ArrayList&lt;String&gt;();
          list.add("Invalid");
          map.put("error_messages", list);
          mv.addAllObjects(map);
      }
  
  
  
  
  
      return mv;
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>*This the spring config which am using
      
      http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"></p>
  
  <pre><code>      &lt;import resource="datasource-config.xml"/&gt;
        &lt;import resource="dao-config.xml"/&gt;
  
  
  &lt;bean id="viewResolver"
      class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
  
      &lt;property name="prefix"&gt;
          &lt;value&gt;/WEB-INF/jsp/&lt;/value&gt;
      &lt;/property&gt;
  
      &lt;property name="suffix"&gt;
      &lt;value&gt;.jsp&lt;/value&gt;
      &lt;/property&gt;
  
  &lt;/bean&gt;
      &lt;bean id="xmlFileViewResolver" class="org.springframework.web.servlet.view.XmlViewResolver"&gt;
          &lt;property name="order" value="2" /&gt;
          &lt;property name="location" value="/WEB-INF/views.xml" /&gt;
      &lt;/bean&gt;
  
  &lt;bean name="/*.html" class="com.dashboard.web.controller.GridMappingController" scope="request"&gt;
      &lt;property name="gridMappingFacade" ref="gridMappingFacade"/&gt;
  &lt;/bean&gt; 
  
  &lt;bean id="gridMappingFacade" class="com.dashboard.web.application.GridMappingFacadeImpl"&gt;
      &lt;property name="gridMappingService" ref="gridMappingService" /&gt;     
  &lt;/bean&gt;
  
  &lt;bean id="gridMappingService" class="com.dashboard.web.service.GridMappingServiceImpl"&gt;
      &lt;property name="gridMappingRepository" ref="gridMappingRepository" /&gt;       
  &lt;/bean&gt; 
  
  &lt;/beans&gt;*
  </code></pre>