You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by js...@noos.fr on 2006/08/21 17:01:29 UTC

Why Back Button pertube an Action ?

Hello , 

I search a lot but i don't find so i write to you. 
If you have experience this problem , thank for your help

I have a problem with Back Button of the navigator with a Struts application :

When i make an action A (who forward to a jsp where i a have B anb C action).
If I make B (who forward to another jsp) and then if i go back with navigator back button and then if try to make C action , it make B in the place of C.

I use with sucess the framework of Mandfred Wollf :
http://www.manfred-wolff.de/struts/articles-old/HowTo-Back.html to go back in struts application whith a Button in a jsp.

But , my superior will we make back on the browser !
It's that a big failure of Struts or there is an issue ?


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


Re: Why Back Button pertube an Action ?

Posted by Michael Jouravlev <jm...@gmail.com>.
On 8/21/06, js.meunier@noos.fr <js...@noos.fr> wrote:
> Hello ,
>
> I search a lot but i don't find so i write to you.

Please use Struts Users Mailing List (user@struts.apache.org) for
questions. If you want to reply, please do so to the user list.

> If you have experience this problem , thank for your help
>
> I have a problem with Back Button of the navigator with a Struts application :
>
> When i make an action A (who forward to a jsp where i a have B anb C action).
> If I make B (who forward to another jsp) and then if i go back with navigator back button and then if try to make C action , it make B in the place of C.

HTTP sniffers and trace messages usually help.

> I use with sucess the framework of Mandfred Wollf :
> http://www.manfred-wolff.de/struts/articles-old/HowTo-Back.html to go back in struts application whith a Button in a jsp.

I believe you should address your question to the author of this
framework. Also, you cannot go back using just the server-side code.
At best you can go to the same location that has been requested prior
to current location, but this is not exactly going back, the browser
history object still grows. To actually go back you need to use
something like history.back() on a client.

I haven't look at the code of the framework that you use, but it may
try to control the locations that are allowed for a particular
location. Say, it allows you to go to B and C from A, but it does not
allow to go to C from B. When you click Back button in the browser
from B, browser shows you a previous page. If that page is cached,
then server is not notified, so the server thinks that the current
page is still B. Then you try to go to C, and the framework that you
use does not allow you to do that.

> But , my superior will we make back on the browser !

I think this is a reasonable requirement.

> It's that a big failure of Struts or there is an issue ?

The observed behavior is not a failure of Struts. Most likely the
problem is in the framework that you use or in the way you use it.

Michael.

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