<s:iterator value="#articleList2" begin="0" end="6">
<li><span>
<s:if test="%{(postTime.toString()).length()>10}">
<s:property value="(postTime.toString()).substring(0,10)"/>
</s:if>
</span> <a href="${pageContext.request.contextPath}/style/#" class="list"
style="width:310px;">
<s:if test="%{title.length()>25}">
<s:property value="title.substring(0,25)+'...'"/>
</s:if>
<s:else>
${title }
</s:else>
</a></li>
</s:iterator>
这里面begin和end就是控制显示几条数据的
这样的话,可以值修改前台就不需要再修改后台
03-17
1536
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交