我正在使用Spring和tile
我正在尝试执行此类代码
<tiles:importAttribute name='cssBase' ignore='true' />
<c:forEach items='${cssBase}' var='cssfile'>
<link rel='stylesheet' href='${pageContext.request.contextPath}/${cssfile}'>
</c:forEach>
我想把这个类型放在我的jsp页面中
<link rel="stylesheet" href="/account/css/bootstrap/bootstrap.min.css">
<link rel="stylesheet" href="/account/css/bootstrap/base.css">
<link rel="stylesheet" href="/account/css/bootstrap/datatable.bootstrap.css">
<link rel="stylesheet" href="/account/css/bootstrap/jquery-ui.css">
<link rel="stylesheet" href="/account/css/bootstrap/bootstrap-select.css">
<link rel="stylesheet" href="/account/css/bootstrap/bootstrap-select.min.css">
<link rel="stylesheet" href="/account/css/bootstrap/jquery.mCustomScrollbar.css">
但我写<c:out value="${head}"></c:out>
这段代码进入我的jsp页面
但是给我输出看起来像
<tiles:importAttribute name='cssBase' ignore='true' />
<c:forEach items='${cssBase}' var='cssfile'>
<link rel='stylesheet' href='${pageContext.request.contextPath}/${cssfile}'>
</c:forEach>
给我另一种方法来做到这一点......提前感谢
答案 0 :(得分:3)
# JSTL tag
<c:import url="headerAccountCSS.html" />