<s:if test="%{null!=bookName&&bookName.length()>5}">
<s:property value="%{bookName.substring(0, 5)}" />..
</s:if>
<s:else>
<s:property value="%{bookName}" />
</s:else>
转载于:https://www.cnblogs.com/weipeng/archive/2012/05/24/2516032.html