struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Satyam" <ashutosh.sat...@alopa.com>
Subject Chaining Actions.
Date Mon, 03 Nov 2003 10:24:33 GMT
Hi,
  I just wanted to know how do I chain the actions, if the action classes sit in separate
struts-config file.

The two struts configuration files are as mentioned below.

Struts-configApp1.xml 

<action 
    path="/Operation"
    type="com.test.Operation"
    scope="request"
    parameter="method" > 
    <forward name="success" path="SuccessDefinition"/>
    <forward name="jobManager" path="/Mgr.do?method=viewStatus"/>
</action>

Struts-configApp2.xml 

<action 
    path="/Mgr"
    type="com.test.Manager"
    scope="request"
    parameter="method" > 
    <forward name="success" path="defintion"/>
    <forward name="failure" path="failuredefiniton"/>
</action>

Snippet of the web descriptor file.

<servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>
      org.apache.struts.action.ActionServlet
    </servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/config/ Struts-configApp1.xml </param-value>
    </init-param>
    <init-param>
      <param-name>config/fwupgrade</param-name>
     <param-value>/WEB-INF/config/ Struts-configApp2.xml </param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>

I tried like this but got invalid path. Can we not specify the forward path as mentioned above?
Will all the request parameter that is available to the first action class will be available
even to the second action
class in the chain?

Regards,
Ashutosh



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message