title: Circular view path
body: <p>I am using Spring MVC 3 and all I am trying to do is submitting a form with post request and redirecting the post request handler on the controller to some page. But I am getting the following error when I try to do that:</p>
  
  <pre><code>javax.servlet.ServletException: Circular view path [thanks.htm]: would dispatch back to the current handler URL [/wickedlysmart/thanks.htm] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
  </code></pre>
  
  <p>Following is the code I am using:</p>
  
  <p>Request handler:</p>
  
  <pre><code>@RequestMapping(method=RequestMethod.GET, value="thanks")
  public ModelAndView thanks() {
      logger.debug("redirecting..");
      return new ModelAndView("thanks");
  }
  @RequestMapping(method = RequestMethod.POST, value="talk")
  public String processContactForm(HttpServletRequest req) {      
      //...
      return "redirect:thanks";
  }
  </code></pre>
  
  <p>View resolver in spring application context:</p>
  
  <pre><code>&lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
  
      &lt;property name="prefix" value="" /&gt;
      &lt;property name="suffix" value=".htm" /&gt;
  
  &lt;/bean&gt;
  </code></pre>
  
  <p>I am not quite able to understand what is going on here. I see "redirecting.." being logged and then I get this error. Could someone help me with this issue?</p>
  
  <p>Thanks.</p>