Scott,
     The <forward> failed simply cuz it refered to my context not to the
other different context I wanna redirect to.
I used the simple sendRedirect and it worked fine:
String path = "http://localhost:7008/portal/main.do";;
response.sendRedirect(path);
return;

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Thursday, August 17, 2006 11:45 PM
To: user@struts.apache.org
Subject: Re: Forwards between webapps

Scott Van Wart wrote:
> Saeed, Rada wrote:
>> Forwards between webapps are not supported, cuz both have different 
>> contexts, this's what I got from running this :
>> <forward name="portal" path="/portal/main.do" redirect="true"
>> contextRelative="false" />
>> Is there any other way to achieve this forward between different web 
>> applications ?
>>   
> I think the class 'org.apache.struts.actions.SwitchAction' might do 
> the trick (struts-config.xml):
> 
>  <action path="/toModule" 
> type="org.apache.struts.actions.SwitchAction" />
> 
> And then in your JSP:
> 
>  <html:link page="/toModule.do?prefix=portal&page=/main.do">To
> Portal</html:link>
> 
> - Scott

SwitchAction helps for switching between Struts modules within the same
webapp, not for switching between different webapps, AFAIK. It's not
possible to *forward* from one webapp to another, but redirecting is
fine.

The OP's <forward> declaration specifies a non-context-relative
redirect, which should result in a client-side (browser) redirect to the
specified URL on the same host/port.

Saeed, what happens when you try to use that forward? How is it failing
for you? It looks like it should work to me.

L.


---------------------------------------------------------------------
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]

Reply via email to