How do you reference attribute list from Apache Tiles template

我的梦境 提交于 2019-12-06 14:41:47

I think there is a problem with the: inherit="true" attribute. Since you are not extending a definition, try removing it and see if it works.

There may be some jar version issue.So check jar version compatibility. Also check your Dynamic-Web-Module version in java project facets and tomcat version also. For example- if your dynamic-web-module is 3.0 and you deploy on Tomcat 7, then this type of errors might be occurred.

<put-list-attribute name="links" >
        <add-attribute value="/css/style.css"/>

        <add-attribute value="/css/magnific-popup.css"/>
        <add-attribute value="/css/datepicker.css"/>
        <add-attribute value="/css/font-awesome.min.css"/>      
 </put-list-attribute>


<tiles:useAttribute id="list" name="links" classname="java.util.List"/>
    <c:forEach var="href" items="${list}"> 
        <link  rel="stylesheet" href="<c:out value='${href}'/>" />
    </c:forEach> 

Attrubute not loading ???

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!