Bascaily what I would like to accomplish is to delete a "part" from an order form and then re-query the database to display the list of parts. "DeleteOrder.jsp": - is a screen to confirm to delete part "XZY". - it is of type OrderForm - action = "/app/DeleteOrder" - "orderNumber is a hidden field and is equal to "123". This is the key to re-query the database later.
"OrderSearchAction": - is the Action class to re-query the database with "orderNumber" after the deletion and re-display the list of parts on the next screen. I have this statement at the beginning of the Action class to retrieve "orderNumber ": String nbr = request.getParameter("orderNumber"); Struts-config.xml: <action path="/app/DeleteOrder" type="com.cat.action.OrderMaintainAction" name="OrderFormBean" scope="request" validate="false"> <forward name="Content" path="/app/ListOfOrder.exe" /> <forward name="ContentError" path="/app/DeleteError.jsp"/> </action> <action path="/app/ListOfOrder" type="com.cat.action.OrderSearchAction" name="OrderSearchFormBean" scope="request" validate="false"> <forward name="Content" path="/app/ListOfOrder.jsp"/> <forward name="ContentError" path="/app/OrderError.jsp"/> </action> So when I hit 'submit' on "DeleteOrder.jsp", I expect "orderNumber " to be visible in "OrderSearchAction" in the Request object but it is not. Thanks for any help. ============================================================================ ========== -----Original Message----- From: Gopalakrishnan, Jayesh [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 02, 2004 12:48 PM To: Struts Users Mailing List Subject: RE: Action not forwarding to another Action Could you post the code snippet where you are trying to set & get parameters. I have a similar action chaining configuration that works fine for me. -jayash -----Original Message----- From: Au-Yeung, Stella H [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 8:21 PM To: 'Struts Users Mailing List' Subject: RE: Action not forwarding to another Action Nop. I removed 'redirect="true"' as followed and still can't retrieve the parameter in OrderSearchAction. I even tried to specifically do request.setParamter(...) first and that doesn't work either. <action path="/app/DeleteOrder" type="com.cat.action.OrderMaintainAction" name="OrderFormBean" scope="request" validate="false"> <forward name="Content" path="/app/ListOfOrder.exe" /> <forward name="ContentError" path="/app/DeleteError.jsp"/> </action> <action path="/app/ListOfOrder" type="com.cat.action.OrderSearchAction" name="OrderSearchFormBean" scope="request" validate="false"> <forward name="Content" path="/app/ListOfOrder.jsp"/> <forward name="ContentError" path="/app/OrderError.jsp"/> </action> -----Original Message----- From: Gopalakrishnan, Jayesh [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 6:45 PM To: Struts Users Mailing List Subject: RE: Action not forwarding to another Action I think when you say 'redirect="true"', then you lose your request object. This is like a client side/browser redirect. Remove this attribute from your <forward> element and give it a try. -----Original Message----- From: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 3:24 PM To: Struts Users Mailing List Subject: RE: Action not forwarding to another Action <If Im not wrong>if ".exe" is what you hv configured in web.xml then I see there is no reason why it is not picking up </> possible reason could be... make sure that you are forwarding to "Content" which is mapped to "/app/ListOfOrder.exe" in your OrderMaintainAction >>1) Can someone also tell me if I have a "Request attribute" defined in >>OrderMaintainAction, if the above redirection works, will I be able to >>see the same "Request attribute" in OrderSearchAction? the same scenarion where I'm not able to get the value of request attribute which I set in my previous Action class then I set as session attribute and Im able to get that value in the other Action class where Im redirecting to. >>2) A general question: if formA is linked to formB through a 'link'. If I >>click on the 'link' in formA, can I get to the passed parameter of >>FormA by >>doing Request.geParameter("id") or I can only retrieve 'id' throught a >>'submit' rather than through a 'link'? I dont really understand your point but I assumed that you are passing a parameter from one form to another in such case if you are calling other page/calling action class by passing request parameter you could get those parameters on the other page/action class. hth -Ramadoss -----Original Message----- From: Au-Yeung, Stella H [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 5:51 PM To: '[EMAIL PROTECTED]' Subject: Action not forwarding to another Action Hi: I have a similar problem that I can't invoke OrderSearchAction.exe from OrderMaintainAction. I set a debug breakpoint at the beginning of OrderSearchAction and never get there. <action path="/app/DeleteOrder" type="com.cat.action.OrderMaintainAction" name="OrderFormBean" scope="request" validate="false"> <forward name="Content" path="/app/ListOfOrder.exe" redirect="true" /> <forward name="ContentError" path="/app/DeleteError.jsp"/> </action> <action path="/app/ListOfOrder" type="com.cat.action.'redirect="true"'" name="OrderSearchFormBean" scope="request" validate="false"> <forward name="Content" path="/app/ListOfOrder.jsp"/> <forward name="ContentError" path="/app/OrderError.jsp"/> </action> I have two other questions: 1) Can someone also tell me if I have a "Request attribute" defined in OrderMaintainAction, if the above redirection works, will I be able to see the same "Request attribute" in OrderSearchAction? 2) A general question: if formA is linked to formB through a 'link'. If I click on the 'link' in formA, can I get to the passed parameter of FormA by doing Request.geParameter("id") or I can only retrieve 'id' throught a 'submit' rather than through a 'link'? Thanks for any help! --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]