是否可以在Struts 1中使用Tiles2?如何在Struts 1中使用Tiles2 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>
這是瓷磚1解決方案,我需要使用瓷磚2 –