title: need to pass value from javascript to Spring mvc controller
body: <p>I am doing encryption and decryption of message at javascript and want to send result message to the spring controller mvc.</p>
  
  <pre><code>@RequestMapping(value = "/token")
  public @ResponseBody String getAllBooks(@RequestParam boolean isAuth, @ModelAttribute("somedata") Token data) {
      ModelAndView mav = new ModelAndView();
      mav.addObject("encryptedToken", data.getValue()); return token;}
  </code></pre>
  
  <p>Hence the token should hold the value from javascript. I am not using jquery. How to get that value from javascript to Spring mvc controller.</p>
  
  <pre><code>&lt;script&gt;
  function Encrypt(msg) {
  ...................
  ...................
  return encryptedFinally;}
  &lt;/script&gt;
  </code></pre>
  
  <p>I want to use this variable (i.e. encryptedFinally) in java controller class. </p>