What does the dollar curly brackets ${} mean in JSP?

brownmamba picture brownmamba · Apr 20, 2011 · Viewed 36.2k times · Source

What does ${} means in JSP? For example,

<c:if test="${!empty cookie.lang}">
    <fmt:setLocale value="${cookie.lang.value}" />
</c:if>

Answer

Harima555 picture Harima555 · Apr 20, 2011

its an El expression basically it outputs the value that result from evaluating the expression, to put it simply, it allows you to access the values of the properties of your java beans using "dots" instead of using getters and setters, using it you can access instances of beans that can be in session,request, or page scope