You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Scott Mulligan <sc...@eds.com> on 2004/07/29 16:42:10 UTC

Multiple Struts Applications

I have two distinct Struts applications running in Tomcat between which I 
would like to forward a request. I have not been able to create a forward to 
do this. I was able to do this with multiple modules within the same 
application, but I would like to be able to forward the request from one 
struts application to another and still have visibility to the request 
attributes.

Is this possible? If so, how? Examples would be much appreciated.


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


Re: Multiple Struts Applications

Posted by James Williamson <ja...@nameonthe.net>.
> I have two distinct Struts applications running in Tomcat between which I
> would like to forward a request. I have not been able to create a forward
> to
> do this. I was able to do this with multiple modules within the same
> application, but I would like to be able to forward the request from one
> struts application to another and still have visibility to the request
> attributes.
>
> Is this possible? If so, how? Examples would be much appreciated.

Not that I've ever done it but the api. says it's possible, get a 'handle'
on another context using the getContext(String) method of ServletContext,
then use the ServletContext returned to get the associated
RequestDispatcher. You'll need to set the Context's crossContext to true
to make this work using Tomcat:

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html

James Williamson
www.nameonthe.net


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