Sunday, October 6, 2013

How to redirect to another action within Struts.xml file - Struts2

<action name="contact-form"
            class="net.viralpatel.contact.view.ContactAction" method="search">
            <result name="success" type="tiles">/contactCrud.tiles</result>
 </action>

<action name="delete"
            class="net.viralpatel.contact.view.ContactAction" method="delete">
            <result name="success" type="chain">contact-form</result>
 </action>

Above is taken from the struts.xml

when we delete, it redirects to 'contact-form' action and does whatever within that action.

No comments:

Post a Comment