日期:2014-05-16  浏览次数:20334 次

jstl if if else 截取文章标题 ...
<c:set var="entity.title" value="文章标题测试"
<c:choose>
<c:when test="${fn:length(entity.title) > 10}">
<c:out value="${fn:substring(entity.title, 0, 10)}......" />
</c:when>
<c:otherwise>
<c:out value="$entity.title}" />
</c:otherwise>
</c:choose>