title: AJAX returns 404 in Spring MVC
body: <p>ViewResolver (my jsp is in the right folder as specified on prefix value):</p>
  
  <pre><code>&lt;!-- Resolves views selected for rendering by @Controllers --&gt; 
  &lt;!-- to .jsp resources in the /WEB-INF/views directory --&gt;
  &lt;beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
      &lt;beans:property name="prefix" value="/WEB-INF/views/" /&gt;
      &lt;beans:property name="suffix" value=".jsp" /&gt;
  &lt;/beans:bean&gt;
  </code></pre>
  
  <p>Servlet mapping:</p>
  
  <pre><code>&lt;servlet-mapping&gt;
      &lt;servlet-name&gt;appServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.fst&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>@Controller
  public class HomeController {   
      private static final Logger logger = 
          LoggerFactory.getLogger(HomeController.class);
  
      @RequestMapping("/home")
      public ModelAndView home(String user, HttpServletRequest request) {
          logger.info("Home controller has been executed");
          ModelAndView mv = new ModelAndView();
  
          mv.addObject("userName", user);
          mv.addObject("controllerName", request.getRequestURI());
          mv.setViewName("home");
  
          return mv;
      }
  
      @RequestMapping(value = "/testAjax", method = RequestMethod.POST)
      public String testAjax(@RequestParam("memberId") String id, 
          HttpServletRequest request, HttpServletResponse response, 
          Locale locale, Model model) {
  
          logger.info("Text Ajax action has been executed. My Parameter is " + id);
  
          return id;
      }
  }
  </code></pre>
  
  <p>After turning on Tomcat 8 server on STS IDE, accessing this web with this url <code>http://localhost:8080/home.fst</code> works okay.</p>
  
  <p>But on the page, calling AJAX like below throws a <code>404</code> error:</p>
  
  <pre><code>$.ajax({
      type: "POST",
      url: "/testAjax.fst",
      data: {"memberId" : "test"},
      success: function (result) {
          console.log(result)
      } 
  });
  </code></pre>
  
  <p>This is console error log:</p>
  
  <pre><code> POST http://localhost:8080/testAjax.fst 404 (Not Found)
   k.cors.a.crossDomain.send                     jquery-2.1.3.min.js:4
   n.extend.ajaxhome.fst:11 (anonymous function) jquery-2.1.3.min.js:3
   n.event.dispatch                              jquery-2.1.3.min.js:3
   r.handle
  </code></pre>
  
  <p>Strange thing is that it calls <code>testAjax</code> controller just fine and there's no error log on server.</p>
  
  <pre><code>logger.info("Text Ajax action has been executed. My Parameter is " + id);
  </code></pre>
  
  <p>When <code>textAjax</code> action is invoked by my AJAX, the log is printed as well. I checked it out with debug point too (it broke alright).</p>
  
  <p>What seems to be the matter??</p>