I have recently started using the new sub-application feature of struts-1.1 and I think it is an excellent addition. However, the standard SwitchAction does not seem to work as advertised. I am currently able to work around this issue by defining global forwards (with the contextRelative attribute set to "true") in sub-applications that need to link to other sub-applications... However, I feel that I will be faced with a real problem unless the technique used in the standard SwitchAction can be made to work as advertised.
I have read all the email on this list that talks about the issue and I have the same problem that everyone else has. I have looked at the source and in my cursory review I don't see how this action could possibly work. In the RequestProcessor, the method processForward() contains the following lines of code: // Construct a request dispatcher for the specified path String uri = appConfig.getPrefix() + forward; The problem I see with this is that the appConfig variable is the member variable of the RequestProcessor that is processing the current SwitchAction request, not the ApplicationConfig object that was set on the request by the RequestUtils.selectApplication() call made in the SwitchAction (*). That said, appConfig.getPrefix() will not return the prefix of the sub-application you want to switch to... (*) Another problem I am seeing is the ApplicationConfig request attribute (key='org.apache.struts.action.APPLICATION'), which is set in the SwithAction via the RequestUtils.selectApplication() call, is getting overwritten by the time the jsp gets controll... I have verified that selectApplication() is setting the ApplicationConfig to that of the sub-application I am trying to switch to. However, when I inspect the request attributes from my jsp page the ApplicationConfig attribute is somehow magically reset to the config for the sub-app that invoked the SwitchAction... Is anyone currently addressing this issue??? Has anyone ever seen SwitchAction work as advertised??? If so what is the trick??? Thanks, Troy -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>