method #1
ActionA extends Action { ActionForward perform(...) { ActionServlet servlet = getServlet(); RequestDispatcher rd = servlet.getConfig().getContext().getRequestDispatcher("actionB.do?command=XY" ); rd.forward( request, response ); return null; } } method #2 ActionA extends Action { ActionForward perform(...) { response.sendRedirect( response.getEncodedURL( request.getContextPath()+"/actionB.do?command=XY") ); return null; } } -- Peter Pilgrim ++44 (0)207-545-9923 //_\\ "Mathematics is essentially the study of islands of ======= disparate subjects in a sea of ignorance." || ! || Andrew Wiles _____________ ---------------------------------------- Message History ---------------------------------------- From: Wolfgang Frank <[EMAIL PROTECTED]> on 25/10/2001 16:06 ZE2 Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: ActionForward to ActionClass Hello there, i am currently trying to find a way to call another action (ActionB) from within an action (ActionA). as and ActionForeward object should be returned from an action i cerated a new ActionForward with the path of the URL, or the action i wanted to call, but it doesn´t seem to work. The problem is that i want to call ActionB with parameters: "actionB.do?command=XY" The parameters are calculated in ActionA ..... This is what I tried: ... ActionA extends Action { ActionForward perform(...) { return new ActionForward("actionB.do?command=XY"); } } I can foreward directly with a requestdispatcher but browser doesn´t stop properly and continues loading. I think there should be a way using the STRUTS calsses ...... Can anybody help please? I think I made some mistake ...... Thank you Wolfgang -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.