我正在使用 Spring 和瓷砖
我正在尝试执行这种类型的代码
<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>
给我另一种方法来做到这一点......提前致谢
最佳答案
# JSTL tag
<c:import url="headerAccountCSS.html" />
关于jsp - 运行存储在数据库中的 JSTL 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25969238/