struts2标签

struts2  标签截取字符串的功能 <td>
           <!-- 显示第5个字符到第10个字符 -->
           <s:if test="%{null!=desc&&desc.length()>5}">
                      <s:property value="%{desc.substring(5, 11)}" />……
           </s:if>
           <s:else>
                      <s:property value="%{desc}" />
           </s:else>
</td>

日期格式化
<s:date name ="task_begin_time" format ="yyyy-MM-dd HH:mm:ss"></s:date>

重定向乱码处理
<action name="draftAction" class="com.longyi.citicoa.domain.action.DraftAction">
<result name="design_list">page/work/designDraft_list.jsp</result>
<result name="design_draft">page/work/design_draft.jsp</result>
<result name="viewDesign">page/work/viewdesign.jsp</result>
<result name="list" type="redirect">
    <param name="location">draftAction!list.action?message=${message}</param>
    <param name="encode">true</param>
</result>
</action>

你可能感兴趣的:(struts2标签)