I am going through chapter of JSTL in head first servlets and Jsp and i am trying to iterate through a collection of Employees
using JSTL c:forEach. This is the code
Here is the code for the Jsp
The strange thing is that the integer version of c:forEach is working but the below version is not. I am just showing the OR as an alternate
modification i did on the code. I don't know why it is not evaluating and not showing any values. Please help.
Another thing, i have noticed is, Employee list is coming as null. Any ideas why that is happening though i am setting list in session scope.
It was a pretty stupid thing over my part. It has no issues. Actually, i was reading this chapter in free time in office and the most dumb mistake i made
was, i was directly calling the jsp, not invoking the servlet. In that case, no attribute was made and list was obviously empty. So no mistake in code, actually
mistake from my end.