how to pass a variable to jspf

JavaScript
<c:set var="foo" value="bar"/>
Source

Also in JavaScript: