You can get a javascript value and put it inside a variable in java .
EX:
var len = $(" #relacaoPax select[name=tipo] ").length;
console.log( "len = " + len );
});
<% int l = len;
System.out.println( "//L = " + l );
%>
You can get a javascript value and put it inside a variable in java .
EX:
var len = $(" #relacaoPax select[name=tipo] ").length;
console.log( "len = " + len );
});
<% int l = len;
System.out.println( "//L = " + l );
%>
You can not do what you want because all the JAVA code on your page is processed on the server, and when you get to the browser there will only be HTML and JAVASCRIPT code to be interpreted.