title: How to get Java boolean in javascript?
body: <p>I want to make an ajax call from a jsp :</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
      function isTablePkUsedInFk(table_, pkVal) {
  
          var url_ = "&lt;c:url value='/ajaxIsTablePkUsedInFk' /&gt;";
  
          var ret = $.ajax({
              data : {"table" : table_ , "pkVal" : pkVal},
              type : "POST",
              url  : url_,
              async: false
          }).responseText;
  
          ret = $.trim(ret);
  
          return ret;
  
      }
  
  &lt;/script&gt;
  </code></pre>
  
  <p>In the controller :</p>
  
  <pre><code>@Controller
  @RequestMapping("/")
  public class Home {
  
      @Autowired
      private Environment env;
  
      @Autowired
      private UtilisateurDAO utilisateurDao;
  
      @Autowired
      private MenuDAO menuDao;
  
      @Autowired
      private DbDAO dbDao;
  
      @RequestMapping(value = "/ajaxIsTablePkUsedInFk", method = RequestMethod.POST)
      @ResponseBody
      public boolean ajaxIsTablePkUsedInFk(HttpServletRequest request) {
          String table = request.getParameter("table");
          String pkVal = request.getParameter("pkVal");
          return dbDao.isTablePkUsedInFk(table, pkVal);
      }
  
  }
  </code></pre>
  
  <p>In runtime nothing happens when I call the javascript function <code>isTablePkUsedInFk</code> ! So how to get the Java boolean in javascript ?</p>