I have an array list with multiple value on jsp, and I want to iterate the array list. so that I can assign the values one by one in a textarea.
My jsp code:
<%
for(i=0;i<padetaillist.size();i++)
{
%>
<textarea id="txtpmhistory" class="txtpmhistoryy" name="txtpmhistory"
rows="1" cols="150" placeholder="Past Medical History">
<%=padetaillist.get(i).getpmhistory()%></textarea>
<textarea id="txttobbaco" class="txttobbaco" name="txttobbaco"
rows="1" cols="150" placeholder="Tobbaco or Smoking">
I think this is wrong, I have several textareas but my jsp is not even displaying a single one.
So how can I iterate my arraylist so that I can assign the value to a text area and my jsp will display properly? Is there any way that I can iterate my arraylist in JavaScript or with jquery and assign the value to a textarea?
Thanks Rushang