jstl 中substring,length等函数用法

引入jstl库:<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>

<td>                                    

     <div title="${cpe.position}">

        <c:if test="${fn:length(cpe.position)<35}">${cpe.position }</c:if> 

         <c:if test="${fn:length(cpe.position)>=35}">${fn:substring(cpe.position,0,32)}...</c:if>  

      </div>

</td>

 

你可能感兴趣的:(substring)