You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Sreekanth S. Nair" <sr...@egovernments.org> on 2013/05/08 07:23:07 UTC

Redirecting to another action which is in another web context

Hi,
    Does Struts2 have any way to redirect from one action to another action
which exist in a different Web Context.
ServletRedirectResult and ServletActionRedirectResult doesn't seems to be
work for Cross Context Action redirection.
-- 
Thanks & Regards
Srikanth
Software Developer
--------------------------------
eGovernments Foundations
www.egovernments.org
Mob : 9980078913
--------------------------------

Re: Redirecting to another action which is in another web context

Posted by srikanth <sr...@egovernments.org>.
Found the way, In ServletActionRedirectResult we have to set
"prependServletContext" to "false"

On 08/05/2013 11:04, 陈岗 wrote:
> Hi
>
> try them
>
> <result name="success" type="redirect">
>
> or
>
> <result name="success" type="redirectAction">
>
> or
>
> <result name="success" type="chain">
>
>
>
> 2013/5/8 Sreekanth S. Nair <sr...@egovernments.org>
>
>> Hi,
>>     Does Struts2 have any way to redirect from one action to another action
>> which exist in a different Web Context.
>> ServletRedirectResult and ServletActionRedirectResult doesn't seems to be
>> work for Cross Context Action redirection.
>> --
>> Thanks & Regards
>> Srikanth
>>
>
>


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


Re: Redirecting to another action which is in another web context

Posted by srikanth <sr...@egovernments.org>.
Hi Dale,
          I think you did get what i mean , cross context means (not 
local/ remote) but two web application exist inside an EAR.
http://localhost:8080/abc/a/abc.action
http://localhost:8080/xyz/x/xyz.action
I have to redirect from*abc.action* which is in *abc *webcontext to 
*xyz.action* which exit in*xyz* webcontext

On 08/05/2013 11:15, Dale Newfield wrote:
> It's just generating a URL and telling the browser to redirect there.  Why should the scope (local/remote) matter?
> -Dale
>
> On May 8, 2013, at 1:38 AM, "Sreekanth S. Nair" <sr...@egovernments.org> wrote:
>
>> Hi Gang,
>>      I hope these all works only for those action which exist in the same
>> web context not for action exist in another web context.
>>
>>
>> -- 
>> Thanks & Regards
>> Srikanth
>>
>>
>> On Wed, May 8, 2013 at 11:04 AM, 陈岗 <da...@gmail.com> wrote:
>>
>>> Hi
>>>
>>> try them
>>>
>>> <result name="success" type="redirect">
>>>
>>> or
>>>
>>> <result name="success" type="redirectAction">
>>>
>>> or
>>>
>>> <result name="success" type="chain">
>>>
>>>
>>>
>>> 2013/5/8 Sreekanth S. Nair <sr...@egovernments.org>
>>>
>>>> Hi,
>>>>     Does Struts2 have any way to redirect from one action to another
>>> action
>>>> which exist in a different Web Context.
>>>> ServletRedirectResult and ServletActionRedirectResult doesn't seems to be
>>>> work for Cross Context Action redirection.
>>>> --
>>>> Thanks & Regards
>>>> Srikanth
>>>
>>>
>>> --
>>> Gang Chen
>>> TILSI
>>> Taicang Institute For Life Science Information
>>> Address: A2/162, Renmin South Road, Taicang, 215400, Jiangsu Province,
>>> P.R.China
>>> Phone:(+86)512-82782588
>>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>


Re: Redirecting to another action which is in another web context

Posted by Dale Newfield <da...@newfield.org>.
It's just generating a URL and telling the browser to redirect there.  Why should the scope (local/remote) matter?
-Dale

On May 8, 2013, at 1:38 AM, "Sreekanth S. Nair" <sr...@egovernments.org> wrote:

> Hi Gang,
>     I hope these all works only for those action which exist in the same
> web context not for action exist in another web context.
> 
> 
> -- 
> Thanks & Regards
> Srikanth
> 
> 
> On Wed, May 8, 2013 at 11:04 AM, 陈岗 <da...@gmail.com> wrote:
> 
>> Hi
>> 
>> try them
>> 
>> <result name="success" type="redirect">
>> 
>> or
>> 
>> <result name="success" type="redirectAction">
>> 
>> or
>> 
>> <result name="success" type="chain">
>> 
>> 
>> 
>> 2013/5/8 Sreekanth S. Nair <sr...@egovernments.org>
>> 
>>> Hi,
>>>    Does Struts2 have any way to redirect from one action to another
>> action
>>> which exist in a different Web Context.
>>> ServletRedirectResult and ServletActionRedirectResult doesn't seems to be
>>> work for Cross Context Action redirection.
>>> --
>>> Thanks & Regards
>>> Srikanth
>> 
>> 
>> 
>> --
>> Gang Chen
>> TILSI
>> Taicang Institute For Life Science Information
>> Address: A2/162, Renmin South Road, Taicang, 215400, Jiangsu Province,
>> P.R.China
>> Phone:(+86)512-82782588
>> 

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


Re: Redirecting to another action which is in another web context

Posted by "Sreekanth S. Nair" <sr...@egovernments.org>.
Hi Gang,
     I hope these all works only for those action which exist in the same
web context not for action exist in another web context.


-- 
Thanks & Regards
Srikanth


On Wed, May 8, 2013 at 11:04 AM, 陈岗 <da...@gmail.com> wrote:

> Hi
>
> try them
>
> <result name="success" type="redirect">
>
> or
>
> <result name="success" type="redirectAction">
>
> or
>
> <result name="success" type="chain">
>
>
>
> 2013/5/8 Sreekanth S. Nair <sr...@egovernments.org>
>
> > Hi,
> >     Does Struts2 have any way to redirect from one action to another
> action
> > which exist in a different Web Context.
> > ServletRedirectResult and ServletActionRedirectResult doesn't seems to be
> > work for Cross Context Action redirection.
> > --
> > Thanks & Regards
> > Srikanth
> >
>
>
>
> --
> Gang Chen
> TILSI
> Taicang Institute For Life Science Information
> Address: A2/162, Renmin South Road, Taicang, 215400, Jiangsu Province,
> P.R.China
> Phone:(+86)512-82782588
>

Re: Redirecting to another action which is in another web context

Posted by 陈岗 <da...@gmail.com>.
Hi

try them

<result name="success" type="redirect">

or

<result name="success" type="redirectAction">

or

<result name="success" type="chain">



2013/5/8 Sreekanth S. Nair <sr...@egovernments.org>

> Hi,
>     Does Struts2 have any way to redirect from one action to another action
> which exist in a different Web Context.
> ServletRedirectResult and ServletActionRedirectResult doesn't seems to be
> work for Cross Context Action redirection.
> --
> Thanks & Regards
> Srikanth
>



-- 
Gang Chen
TILSI
Taicang Institute For Life Science Information
Address: A2/162, Renmin South Road, Taicang, 215400, Jiangsu Province,
P.R.China
Phone:(+86)512-82782588

Fwd: Redirecting to another action which is in another web context

Posted by "Sreekanth S. Nair" <sr...@egovernments.org>.
Hi,
    Does Struts2 have any way to redirect from one action to another action
which exist in a different Web Context.
ServletRedirectResult and ServletActionRedirectResult doesn't seems to be
work for Cross Context Action redirection.
-- 
Thanks & Regards
Srikanth