2012-07-27 36 views
0

我們已經開始將我們在Struts 1.x(1.2)上運行的項目(Web應用程序)從Framesets遷移到Tile 2.2。使用具有Struts 1.x(1.2)兼容性的Tile 2.2 - Reg

如Apache瓦片教程中所述,我們在web.xml中做了一些修改,並將tiles-defs.xml添加到項目中。但是無法獲得與struts-config.xml到tiles-defs.xml的關係。

Tiles 2.2是否與struts 1.x兼容?有人可以指導我正確的方向,還是提供示例將Tiles 2.2集成到我們的Struts 1.x項目中?

任何形式的幫助最早都會受到歡迎,因爲我們需要在幾天內準備演示。

感謝和問候,

Purushotham雷迪P

回答

0

的struts-config和瓷磚之間的關係將是如下,如果你的動作類返回「成功」的struts-config文件將其轉發給「 tile.AddUpdateTransportation.view」瓷磚

struts-config.xml文件:

<action path="/transportationAddUpdate1" 
     type="com.struts.action.TransportationAction" 
     name="Form1" 
     scope="session" validate="false"> 
     <forward name="success" 
      path="tile.AddUpdateTransportation.view"> 
     </forward> 
</action> 

瓷磚 - defs.xml:

<definition name="tile.AddUpdateTransportation.view" 
    extends=".tops.core.layout"> 
    <put name="content" value="/transportation.jsp" /> 
    <put name="title.section" value="Transportation - Add/Copy/Delete"/> 
</definition> 
+0

嗨JavaStudent, 感謝您的迴應。 我也這麼做了。但我認爲Struts 1.2的兼容性還沒有提供給Tiles 2.2。 你可以通過在配置階段提供任何示例來幫助我使用Struts 1.2啓用Tiles 2.2。即使是一個示例示例也可以。 任何形式的幫助,將不勝感激。 在此先感謝, Purushotham Reddy P. – Chinni 2012-07-30 11:35:19