*, If you want to use variables like el expressions in js code:
function demo() { var args = '${obj.temp}'; //Where obj is the object in the background setAttrbute(), and temp is its variable name }
*, if you want to use java variables or codes in js code
function demo() { var args = '<%= request.getAttrbute("temp")%>'; // where temp is the object in the background setAttrbute(), obviously not as easy to use as above }