You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paul Curren <pc...@cisco.com> on 2003/04/23 23:08:17 UTC

redirecting forwards - no browser URL change

Hi there,

I have a slight problem with local forwards that I have set to be 
redirect="true". The forwards work in that they do forward to the 
correct page and if I attach a debugger and check the forward in the 
action class that is using it, then calling getRedirect returns true as 
well. So all good so far.

However, the url displayed in my browser does not update with a url. It 
continues to show the original url as if a non redirecting forward was used.

Presumably this shouldn't be the case - or is that normal?

If it's abnormal, are there any obvious traps I may have fallen into.

(I'm using Struts 1.1 rc 2, and my forwards all refer to Tiles definitions)

Cheers,

Paul C


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


Re: redirecting forwards - no browser URL change

Posted by Paul Curren <pc...@cisco.com>.
No matter, I found what was happening although I don't quite understand it.

If you forward to a tiles definition then the requesting URL is used and 
no redirect is performed, instead just a standard RequestDispatcher forward.

However, if I replace the path in my redirecting forward with something 
that isn't a tiles definition (e.g. a path to an action) then redirect 
seems to be honoured.

So it looks like funny behaviour from the Tiles controller that I hadn't 
grasped.

If anyone has a better understanding i'm always looking to learn.

Thanks,

Paul C

Paul Curren wrote:

> Hi there,
>
> I have a slight problem with local forwards that I have set to be 
> redirect="true". The forwards work in that they do forward to the 
> correct page and if I attach a debugger and check the forward in the 
> action class that is using it, then calling getRedirect returns true 
> as well. So all good so far.
>
> However, the url displayed in my browser does not update with a url. 
> It continues to show the original url as if a non redirecting forward 
> was used.
>
> Presumably this shouldn't be the case - or is that normal?
>
> If it's abnormal, are there any obvious traps I may have fallen into.
>
> (I'm using Struts 1.1 rc 2, and my forwards all refer to Tiles 
> definitions)
>
> Cheers,
>
> Paul C
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>


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