首先需要引入红色的标签
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<table border="1" cellpadding="0" cellspacing="0" width="85%">
<tr>
<td>客户姓名</td>
<td>性别</td>
<td>生日</td>
<td>手机</td>
<td>邮箱</td>
<td>爱好</td>
<td>类型</td>
<td>备注</td>
<td>操作</td>
<tr>
<c:forEach var="c" items="${requestScope.list }">
<tr>
<td>${c.name }</td>
<td>${c.gender }</td>
<td>${c.birthday }</td>
<td>${c.cellphone }</td>
<td>${c.email }</td>
<td>${c.preference }</td>
<td>${c.type }</td>
<td title="${c.description}" > //当鼠标悬停时显示其全部内容 a标签也有title这个属性
<c:if test="${fn:length(c.description)>12 }">
${fn:substring(c.description, 0, 12)}...
</c:if>
<c:if test="${fn:length(c.description)<=12 }">
${c.description }
</c:if>
</td>
<td>
<a href="#">修改</a>
<a href="#">刪除</a>
</td>
</tr>
</c:forEach>
</table>