> Hi All, > > Can anyone let me know how to achieve chaining of action classes. > > I have an requirement wherein i want to pass the control from one action > class to another . > > I tried the following . > > Method1 > Struts Config > <action path="<action path1>" type="<name of the first action class>" > name="<form bean name>" scope="request" > > <forward name="redirect" path="/testRedirect.do"/> > <forward name="redirect1" path="/testRedirect1.do"/> > > <forward name="redirect2" path="<name of the JSP>"/> > </action> > > <action path="/testRedirect" type="<name of the second action > class>" unknown="true"> > <forward name="test1" path="<name of the JSP >" /> > </action> > > for this i gave the following in my first action class > if(condition1 ) { > return (mapping.findForward("redirect")); > } else if(condition2) { > return (mapping.findForward("redirect1")); > } else { > return (mapping.findForward("redirect2")); > > } > > > Method2 > > Struts Config > > <action path="<action path1>" type="<name of the first action class>" > name="<form bean name>" scope="request" > > <forward name="redirect3" path="<name of the JSP which has logic > redirect>"/> > <forward name="redirect4" path="<name of the JSP>"/> > </action> > <action path="/testRedirect" type="<name of the second action > class>" unknown="true"> > <forward name="test1" path="<name of the JSP >" /> > </action> > > > i coded the redirect JSP as > > <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> > > <% System.out.println("Inside the redirect page:::::"); > %> > <logic:redirect page="/testRedirect.do"/> > > I could not achive redirecting in both methods. Iam getting HTTP Status > 500 - No action instance for path /testRedirect could be created > > > With this chaining i can reuse the action classes without copying code to > achieve similar functionality. > Does struts allow this?? > > Cheers > > Seshadri > > ************************************************************************** This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. **************************************************************************
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>