我在jsp中使用它作为breadcrumb
<div class="breadcrumb">
<c:url var="home" value="http://localhost:8080/" />
<c:forEach var="bc" items="${breadcrumb.tree}" varStatus="status">
<c:choose>
<c:when test="${status.index==0}">
<a href="/">${home}</a>
</c:when>
<c:when test="${status.index == fn:length(breadcrumb.tree)-1 && status.index!=0}">
»${bc.name}
</c:when>
<c:otherwise>
<a href="${bc.value}">»${bc.name}</a>
</c:otherwise>
</c:choose>
</c:forEach>
</div>
我得到了这个 - http://localhost:8080/ »products
但我想要家»产品
任何人都可以告诉我它会是怎样的 .
1 回答
您存储的值为:
进入变量home,然后在anchor标记内输出 .
商店:
输出:
在消息文件中定义home,或忽略分配它 .