struts2 s标签

 <s:if test="%{null!=#questions.topic&&#questions.topic.length()>20}">
                  <td><s:property value="%{#questions.topic.substring(0, 20)}" /></td>
</s:if>
<s:else>
<td><s:property value="%{#questions.topic}" /></td>
    </s:else>
刚刚提供的截取字符串的改成这样就对了

 

 

<s:date name="#comments.createTime"  format="yyyy-MM-dd HH:mm:ss" />
时间类型显示格式,页面上这样显示

posted @ 2010-11-22 17:15  七郎  Views(147)  Comments(0Edit  收藏  举报