title: Spring MVC: Unable to access HTML page via InternalResourceViewResolver
body: <p>I have two files index.html and user.jsp, there location is WebContent/WEB-INF/.</p>
  
  <p>In addition, i am able to access user.jsp with the following code:</p>
  
  <pre><code>&lt;bean
      class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
      &lt;property name="prefix" value="/WEB-INF/" /&gt;
      &lt;property name="suffix" value=".jsp" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Controller code:</p>
  
  <pre><code>@RequestMapping(value="/usertimepass",method=RequestMethod.GET)
  @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
  public ModelAndView time(){
  
      ModelAndView mv=new ModelAndView();
      mv.setViewName("user");
      System.out.println("returned user");
      return mv;
  }
  </code></pre>
  
  <p>However, i am unable to access index.html with the following revamped code:</p>
  
  <pre><code>&lt;bean
      class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
      &lt;property name="prefix" value="/WEB-INF/" /&gt;
      &lt;property name="suffix" value=".html" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Controller code:</p>
  
  <pre><code>@RequestMapping(value="/usertimepass",method=RequestMethod.GET)
  @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
  public ModelAndView time(){
  
      ModelAndView mv=new ModelAndView();
      mv.setViewName("index");
      System.out.println("returned index");
      return mv;
  }
  </code></pre>
  
  <p>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"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee     http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
  id="WebApp_ID" version="3.0"&gt;
  &lt;display-name&gt;SampleApp&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;2&lt;/load-on-startup&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;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;/WEB-INF/applicationContext.xml&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;listener&gt;
      &lt;listener-class&gt;
          org.springframework.web.context.ContextLoaderListener
      &lt;/listener-class&gt;
  &lt;/listener&gt;
  </code></pre>
  
  <p></p>
  
  <p>Thanks!!</p>