why is this working?
<td><c:forEach items="${profileForm.cityOptions}" var="city">
....Some Code
</c:forEach></td>
and in my profielForm been i only have a getCityOptions() method nothing of cityOptions .
its working but i need some explanation.
That’s the principle of the EL. It looks for Java bean properties. A bean property is some information available by a public getter, obeying the JavaBeans conventions. It can also be set using a JavaBean setter, obeying the JavaBeans conventions:
The EL doesn’t care about the fields of your objects. This is private, encapsulated stuff. So
getFoo()could trigger a complex computation returning aFooinstance, or simply return a field namedfoo,baror anything else. The EL doesn’t care.