在jsp頁(yè)面中要導(dǎo)入<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<c:set value="${fn:split(equipment.pic,'|')}" var="name">
equipment.pic是要分割的字符串,以|進(jìn)行分割,然后分割好得到的數(shù)組 ?然后起名為name,就可以對(duì)name進(jìn)行循環(huán)遍歷
fn參考:? http://blog.csdn.net/tfy1332/article/details/22811915
http://www.cnblogs.com/laotan/p/3943917.html