How can i load the css from tiles definition file in springs?
My JSP:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%-- <tiles:importAttribute name="cssList" /> --%>
<tiles:useAttribute id = "stylesList" name="styles" classname="java.util.List"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%-- <link href="<c:url value="/styles/cssreset-min.css"/>" rel="stylesheet" type="text/css" /> --%>
<%-- <link type="text/css" rel="stylesheet"
href="<tiles:getAsString name="cssList"/>"/> --%>
<%-- <link href="<c:url value="cssList"/>" rel="stylesheet" type="text/css" /> --%>
<c:forEach var="eachStyle" items="${styles}">
<link type="text/css" rel="stylesheet" href="<c:out value='${eachStyle}'/>" />
</c:forEach>
<title>Insert title here</title>
</head>
这是我的瓷砖 xml 文件?
<definition name="template-main" template="/WEB-INF/jsp/layouts/main.jsp">
<!-- <put-attribute name="cssList" value="/resources/styles/cssreset-min.css" type="string"/> -->
<put-attribute name="banner-content" value="/WEB-INF/jsp/sections/banner.jsp" />
<put-attribute name="title-content" value="Pet Type" />
<put-attribute name="primary-content" value="" />
<put-attribute name="footer-content" value="/WEB-INF/jsp/sections/footer.jsp" />
<put-list-attribute name="styles">
<add-list-attribute>
<add-attribute value="/resources/styles/cssreset-min.css"></add-attribute>
</add-list-attribute>
</put-list-attribute>
</definition>
我只想从瓷砖定义 xml 文件中加载 css。我怎样才能做到这一点?谁能帮忙。我是新手