There are countless examples out there for my problem, I know, but I went through a lot of them and can't figure out where my mistake is.
I am iterating over an ArrayList(TestSzenario). The class TestSzenario contains a String Variable called name with proper getters and setters.
Here's my code:
<td><select name="selectSzenario" id="selectSzenario" size="1">
<c:forEach items="<%=testszenario.getSzenariosForSummary() %>" var="szenario">
<option>${szenario.name}</option>
</c:forEach></select></td></tr>
My Problem is, the Variable isn't working. I alwas get ${szenario.name} for every option in the select-box. I declared the JSTL-taglib properly and since there are multiple options in the site when done i know the iteration is working. Also I looked in the HTML-sourcecode an the foreach is resolved.
HTML-output:
<tr><td>Szenario:</td>
<td><select name="selectSzenario" id="selectSzenario" size="1">
<option>${szenario.name}</option>
<option>${szenario.name}</option>
</select></td></tr>
EDIT for answer 1: Thank you, but I tried that before:
ArrayList<TestSzenario> szenarioList = testszenario.getSzenariosForSummary();
request.setAttribute("aList", szenarioList);
request.setAttribute("ts", testszenario);
<c:forEach items="${aList}" var="szenario">
<option>${szenario.name}</option>
</c:forEach></select></td></tr>
<c:forEach items="${ts.szenariosForSummary}" var="szenario">
<option>${szenario.name}</option>
</c:forEach></select></td></tr>
But in either case it doesn't even iterate through the List, resulting in only 1 option (the List contains 2 elements).