title: Assigning values from JavaScript to Java variable
body: <p>How to assign a value from JavaScript to Java variable in the JSP page? Is it possible to do this?</p>
  
  <p>The following is the javascript function: </p>
  
  <pre><code>function loadGroupMembers(beanArrayVal){
      document.getElementById("beanVal").value=beanArrayVal;
  
     ------------I have mentioned my requirement below --------------
  
     %%%%%%%%%%%%%%%
  
     int beanArrVal =beanArrayVal ;
  
     %%%%%%%%%%%%%%
  
     ( or )
  
     %%%%%%%%%%
  
     c:set  var="beanvalue" value="${beanArrayVal}"
  
     %%%%%%%%%%%%%
  
  }
  </code></pre>
  
  <p>Even I have assigned that <code>beanArrayVal</code> value in hidden input field too using id <code>beanVal</code> in the same above mentioned function. It's good enough even if is possible to assign value from this hidden field to JSTL variable.</p>