【发布时间】:2011-07-16 11:54:12
【问题描述】:
我有一个具有通用站点布局框架的主模板:“/WEB-INF/jsp/common.jsp” 然后我有另一个模板,该模板通常用于其他具有类似布局的页面:“/WEB-INF/jsp/features/common.jsp”
features 模板基本上定义了“master”模板的属性“content”的内容。
我尝试通过以下方式解决此问题:
<definition name="product.common" template="/WEB-INF/jsp/common.jsp">
<put-attribute name="content" value="/WEB-INF/jsp/features/common.jsp" />
</definition>
<definition name="features/index" extends="product.common">
<put-attribute name="title" value="Features" />
<put-attribute name="rightContent" value="/WEB-INF/jsp/features/index.jsp" />
</definition>
但这不起作用。我在堆栈跟踪中收到以下错误消息:
org.apache.tiles.template.NoSuchAttributeException:找不到属性“rightContent”。
但 features-template 确实具有以下内容:
<tiles:insertAttribute name="rightContent" />
有什么想法吗?
【问题讨论】: