Using Expression Language (EL) in JSP

To use EL in JSP, a page directive has to be specified:

<%@ page isELIgnored="false" %>


Then you can use EL in the JSP, e.g.:

<logic:iterate id="var" name="sampleForm" property="list" indexId="index"> 

          <p>${var.id}</p>
          <logic:equal name="var"
                       property="foo"
                       value="${sampleForm.list[index+1].foo}">
             Value is same as next entry.
          </logic:equal>
</logic:iterate>

Comments

Popular posts from this blog

Java encoding : UTF-8, Big5, x-MS950-HKSCS