Eg : I have var a=10; now i want to use value of 'a' in jsp tag like
<% int b= "how to store javascript variable here"
%>
Eg : I have var a=10; now i want to use value of 'a' in jsp tag like
<% int b= "how to store javascript variable here"
%>
You can set the javascript variable value in a hidden field before submit/process it in server side, so it will be sent as part of Request parameters
document.getElementById('myHidden').value=myVariable;
To access the javascript variable in server side code
Request.getParameter("hiddenName")
That's not possible. You need to read up on the difference between client-side and server-side. This is a really good post: