title: getting a value from controller using jquery post
body: <p>Doing a post from jquery. POST is happening, but not able to access the model attribute added by controller.</p>
  
  <p>JQuery Code:</p>
  
  <pre><code>$.post('&lt;c:url value="/savedLog.form" /&gt;', $('#logForm').serialize(), function(data, textStatus) {
      var jsonlog = "${logJson}"
      if (data === "SUCCESS") {
          alert(jsonlog);
      }
  });
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>public String savedLog(@RequestParam(value = "requestId", required = true) LogRequest request, ModelMap model) throws IOException 
  {
      try 
      {
          //Code to populate log            
          model.addAttribute("logJson", log.getLog());
          return "success";
      }​
  }
  </code></pre>
  
  <p>POST is working fine and the controller method is executing successfully.There is a catch in actual code.Removed as it is redundant.</p>
  
  <p>What could be the issue.
  This line does not work.
      var jsonlog = "${logJson}"
      Is there any issue with model attribute or jquery?</p>
  
  <p>Thank You.</p>