<input type="text" name="${task.getTaskId()}today" placeholder="${tm.get(LocalDate.now()).contains(task.getTaskId()) ? 'saved' : 'dosa'}" size="2">
This is my code situated inside a <c:forEach items="${tasks}" var="task" >.
tm is a HashMap<LocalDate,List<String>>
I tried the same code in a java file it works. But in jsp it doesn't. I always get dosa which implies the condition is false. Why is this ?
It might not fully answer your question, but as far as I know to access a property or field or instance var in EL you don't use Java getter methods but the "." notation or the square brackets.
So for instance while in Java you would go
In EL that would be
or
Then I would probably check if there's a JSTL function that can check if a value is contained in a map