I have the following bean method signatures:
public String foo();  
public List<String> getList(String bar);  
public String getName(String baz);  
The following works for me:
$("#div_id").append('<%= beanId.foo() %>');
The following is what I would like to do, but is a little more complex though, and I can't get it to work.
var list = '<%= beanId.getList("bar") %>';  
for ( var i in list ) {  
  $("#div_id").append('<%= beanId.getName('list[i]') %>');
}
What is the correct way of doing this?