Yes. In a follow-up e-mail I asked a follow-up question. This problem also exists if contextRelative forwards are used. Shouldn't the contextRealtive forward change the module before forwarding the request.
Sanjay -----Original Message----- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 4:03 PM To: Struts Users Mailing List Subject: Re: Why do we need SwitchAction Doing things your way leaves the wrong ModuleConfig stored under the request attribute identified by Globals.MODULE_KEY, so the destination action or page will likely misbehave. You can avoid using SwitchAction, as long as you emulate what it accomplishes -- a call to RequestUtils.selectModule() for the new prefix. Craig On Thu, 30 Jan 2003, Sharma, Sanjay (LNG-DAY) wrote: > Date: Thu, 30 Jan 2003 13:18:23 -0500 > From: "Sharma, Sanjay (LNG-DAY)" <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> > To: Struts Users Mailing List <[EMAIL PROTECTED]> > Subject: Why do we need SwitchAction > > > I am wondering why SwicthAction is needed. > > The following example uses SwitchAction to switch from module test2 to > module test. > > In config file of module test2. > ... > <action-mappings> > <action path="/toModule" > type="org.apache.struts.actions.SwitchAction"/> > ... > </action-mappings> > ... > > To forward to Action test in module test from an Action in current module > (test2), I can use > > return (new > ActionForward("/toModule.do?prefix=/test&page=/test.do")); > > But I can accomplish the same thing by doing > > ActionForward af = new ActionForward("/test/test.do"); > af.setContextRelative(true); > return af; > > So why do we need SwitchAction > > Sanjay > > > > --------------------------------------------------------------------- > 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]