How to compare two object variables in EL expression language?
I am creating a drop down list of all languages. The default language selection for the list will be determined by information added by the user: <select> <c:forEach items="${languages}" var="lang"> <c:choose> <c:when test="${lang}.equals(${pageLang})"> <option value="${lang}" selected>${lang}</option> </c:when> <c:otherwise> <option value="${lang}">${lang}</option> </c:otherwise> </c:choose> </c:forEach> </select> .equals doesn't appear to exist in EL. Having had a look here it's suggested I write my own function and then import and use that. As this is a one off tiny thing just for this page