0

We have started migrating our project (Web Application) which is running on Struts 1.x (1.2) from Framesets to Tiles 2.2.

As stated in the Apache tiles tutorial we have made few modifications in web.xml and added tiles-defs.xml to the project. But couldn't get the relation towards the struts-config.xml to the tiles-defs.xml.

Is Tiles 2.2 compatible with struts 1.x? Can some one please guide me in proper direction or provide me samples to integrate Tiles 2.2 in our Struts 1.x project?

Any kind of help would be appreciated at the earliest as we need to prepare a demo in a couple of days.

Thanks and Regards,

Purushotham Reddy P

Chinni
  • 137
  • 3
  • 8

1 Answers1

0

The relation between struts-config and tiles would be the following, if you action class returns "success" struts-config file will forward it to the "tile.AddUpdateTransportation.view" tiles

struts-config.xml File:

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

tiles-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>
Susie
  • 5,038
  • 10
  • 53
  • 74
  • Hi JavaStudent, Thanks for your response. I have done the same. But I think that the Struts 1.2 compatibility has not yet been given to Tiles 2.2. Can you help me by providing any example right from the configuration stage to enable the Tiles 2.2 with Struts 1.2. Even a sample example would be fine. Any kind of help would be appreciated. Thanks in Advance, Purushotham Reddy P. – Chinni Jul 30 '12 at 11:35