This is my code I use in Jsp file.
Code:
<%! int b = 0; %>
...
<script language="JavaScript">
...
function processStateChange() {
if (req.status == 200) {

<%
b = b +1; //Doan 1
%> 

var c = "<%=b%> //Doan 2
}
}
</script
The value of c = b only I press refresh button of IE.
Please help...