java - How to set end attribute dynamically with Struts2 iterator in JSP -
<% registeraction aro=new registeraction(); int count=aro.getli().size(); %> <s:iterator value="li" begin="0" end="1"> <fieldset> name : <s:property value="name" /><br/> password : <s:property value="password" /><br/> email : <s:property value="email" /><br/> gender : <s:property value="gender" /><br/> country : <s:property value="country" /><br/> </fieldset> </s:iterator> how set end attribute value dynamically iteration, reading count variable ? if use end="<%=count%>" not working. if use end="count" it's working getting same result multiple of numbers if refresh page or reload. you can use #attr notation in ognl read variables set within scritplet blocks, if push them in pagecontext...