title: Spring MVC 3 - How come @ResponseBody method renders a JSTLView?
body: <p>I have mapped one of my method in one Controller to return JSON object by @ResponseBody.</p>
  
  <pre><code>@RequestMapping("/{module}/get/{docId}")
  public @ResponseBody Map&lt;String, ? extends Object&gt; get(@PathVariable String module,
          @PathVariable String docId) {
      Criteria criteria = new Criteria("_id", docId);
      return genericDAO.getUniqueEntity(module, true, criteria);
  }
  </code></pre>
  
  <p>However, it redirects me to the JSTLView instead.  Say, if the {module} is product and {docId} is 2, then in the console I found:</p>
  
  <blockquote>
   DispatcherServlet with name 'xxx' processing POST request for [/xxx/product/get/2]
   Rendering view [org.springframework.web.servlet.view.JstlView: name 'product/get/2'; URL [/WEB-INF/views/jsp/product/get/2.jsp]] in DispatcherServlet with name 'xxx'
  </blockquote>
  
  <p>How can that be happened?  In the same Controller, I have another method similar to this but it's running fine:</p>
  
  <pre><code>@RequestMapping("/{module}/list")
  public @ResponseBody Map&lt;String, ? extends Object&gt; list(@PathVariable String module,
          @RequestParam MultiValueMap&lt;String, String&gt; params,
          @RequestParam(value = "page", required = false) Integer pageNumber,
          @RequestParam(value = "rows", required = false) Integer recordPerPage) {
  ...
  
      return genericDAO.list(module, criterias, orders, pageNumber, recordPerPage);
  }
  </code></pre>
  
  <p>Above do returns correctly providing me a list of objects I required.
  Anyone to help me solve the mystery?</p>