Passing an array into a JSP from a struts action.
Posted on 2011-02-18
I am passing an array of string values from my database into a jsp via a form bean. The array of string values were retrieved and and loaded into the form bean in a Struts action.. However, when I do this:
<input id='ValueList' type='hidden' value='<%=valueList%>' />
The array is not getting assigned correctly to the hidden input variable correctly.
var answer = ;
answer = document.getElementById('ValueList').value;
alert('MY VALUE LIST:::::' + answer);
Is there a way to do this that actually works?