【发布时间】:2012-12-07 14:29:58
【问题描述】:
是否可以将 Tiles2 与 Struts 1 一起使用?
我已按照迁移指南http://tiles.apache.org/migration/index.html中的说明进行操作
但是当我尝试访问我的操作时,我收到了这个错误:
org.apache.tiles.template.NoSuchAttributeException: Attribute 'body' not found.
我在struts-config.xml中有:
<controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"
maxFileSize="10M" tempDir="/tmp" />
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />
</plug-in>
还有tiles-defs.xml
<definition name="mainTemplate" template="/common/templates/mainTemplate.jsp" />
<definition name="index" extends="mainTemplate">
<put-attribute name="body" type="string" value="/views/index/index.jsp" />
</definition>
【问题讨论】:
标签: java tiles struts-1 tiles2