Understanding OGNL expressions in Struts2
问题 The following code displays links using <s:a> of Struts starting from 1 to 10. <s:set var="currentPage" value="2"/> <s:set var="begin" value="1"/> <s:set var="end" value="10"/> <s:iterator begin="%{begin}" end="%{end}" step="1" var="row" status="loop"> <s:if test="%{#currentPage eq #row}"> <!--???--> <span><s:property value="%{#row}"/></span> </s:if> <s:else> <s:url id="pageURL" action="someAction" escapeAmp="false"> <s:param name="currentPage" value="%{row}"/> </s:url> <s:a href="%{pageURL}"