On 1/13/06, Gaet <[EMAIL PROTECTED]> wrote: > Hi, > > Thanks Marcelo, > > For the back button of the browser I have disabled it because user does "tax > declaration" on the web site. > The problem with the back button of the browser is to handle the values typed > by the user 3 pages ago...so if the user go back on this page, the form is > empty...
This is what session scope is for. You can either use session-scoped data and non-cachable pages, so when a user goes back the page is reloaded with current data. Or if you use request scope, you should allow for pages to be cached. Then when a user goes back, he would see data from browser cache. > so I prefer to forbid this action...(using javascript : > action.history.forward(1)) Prohibiting back button sucks, relying on it is foolish, there always will be someone who clicks Ctrl+Left Arrow for going back. Javascript? Can be turned off. > Moreover I do not know if when the user press the back button, if the browser > call back the JSP page or the struts action? Depends on a browser. Opera prefers not to do this at all, maybe only in SSL mode (?). They have explanation for this behavior, but I'd prefer them to reload a page if it is marked non-cached. Technically, cache and page history are two different things, so I can understand Opera reasons. MSIE reloads a page if you mark response as either "no-cache" or "no-store". Firefox does it if page is marked with "no-store". > but I would like to be able to redirect the user to the previous page by > calling the appropriate struts action. If redirecting is OK for you, it means that you have valid data collected in session and your pages can be reloaded with no side effects. Why would not you utilize redirect-after-post pattern, mark pages as non-cachable and enable Back button? You will get the same outcome but with standard means. Michael. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]