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