Re: Handling Browser Back/Forward Button in Struts2

2009-03-30 Thread Paweł Wielgus
gt;> as i tested it throughly and javascript behaviour is not >> >>> >>> consistent >> >>> >>> throught >> >>> >>> >> >>> >>> regarding setting header i did this i developed a custom >> interc

Re: Handling Browser Back/Forward Button in Struts2

2009-01-26 Thread shekher awasthi
; is doing this > >>> >>> > >>> >>> but again its not worked as expected. > >>> >>> i am still clueless how online banking application doing this trick > >>> >>> > >>> >>> i am still on R&D mode for this if find anything will share i

Re: Handling Browser Back/Forward Button in Struts2

2009-01-26 Thread Paweł Wielgus
on R&D mode for this if find anything will share it >>> >>> >>> >>> >>> >>> On 1/22/09, Paweł Wielgus wrote: >>> >>>> >>> >>>> Hi Ehtesham, >>> >>>> it was said before on this

Re: Handling Browser Back/Forward Button in Struts2

2009-01-24 Thread shekher awasthi
You for pointing it out, You made me to add it to my blog post. >> >>>> >> >>>> Best greetings, >> >>>> Paweł Wielgus. >> >>>> >> >>>> 2009/1/22 Ehteshamul Haque : >> >>>> > >> >&

Re: Handling Browser Back/Forward Button in Struts2

2009-01-23 Thread shekher awasthi
gt; Best greetings, > >>>> Paweł Wielgus. > >>>> > >>>> 2009/1/22 Ehteshamul Haque : > >>>> > > >>>> > > >>>> > > >>>> > Hi, > >>>> > > >>>> > I am not that much

Re: Handling Browser Back/Forward Button in Struts2

2009-01-23 Thread Paweł Wielgus
> > >>>> > Hi, >>>> > >>>> > I am not that much expert I I used the following javascript code before >>>> in each page and it workded fine. >>>> > >>>> > >>>> > >>>> > var x=wind

Re: Handling Browser Back/Forward Button in Struts2

2009-01-22 Thread shekher awasthi
I I used the following javascript code before >>> in each page and it workded fine. >>> > >>> > >>> > >>> > var x=window.history.length; >>> > if (window.history[x]!=window.location) >>> > { >>> > window.history

Re: Handling Browser Back/Forward Button in Struts2

2009-01-22 Thread shekher awasthi
>> > { >> > window.history.forward(); >> > } >> > >> > >> > If it work for you I will be very happy. >> > >> > Thank you. >> > >> > -Ehtesham >> > >> > >> > --- On Thu, 1/22/09

Re: Handling Browser Back/Forward Button in Struts2

2009-01-22 Thread shekher awasthi
I will be very happy. > > > > Thank you. > > > > -Ehtesham > > > > > > --- On Thu, 1/22/09, Paweł Wielgus wrote: > > > > From: Paweł Wielgus > > Subject: Re: Handling Browser Back/Forward Button in Struts2 > > To: "Struts Users Mailin

Re: Handling Browser Back/Forward Button in Struts2

2009-01-22 Thread Paweł Wielgus
gt; > > If it work for you I will be very happy. > > Thank you. > > -Ehtesham > > > --- On Thu, 1/22/09, Paweł Wielgus wrote: > > From: Paweł Wielgus > Subject: Re: Handling Browser Back/Forward Button in Struts2 > To: "Struts Users Mailing List" >

Re: Handling Browser Back/Forward Button in Struts2

2009-01-22 Thread Ehteshamul Haque
--- On Thu, 1/22/09, Paweł Wielgus wrote: From: Paweł Wielgus Subject: Re: Handling Browser Back/Forward Button in Struts2 To: "Struts Users Mailing List" Date: Thursday, January 22, 2009, 12:34 AM Hi Shekher, it was very interesting subject, so i dig a little more. Here [1] is what i f

Re: Handling Browser Back/Forward Button in Struts2

2009-01-22 Thread Ehteshamul Haque
Thu, 1/22/09, Paweł Wielgus wrote: From: Paweł Wielgus Subject: Re: Handling Browser Back/Forward Button in Struts2 To: "Struts Users Mailing List" Date: Thursday, January 22, 2009, 12:34 AM Hi Shekher, it was very interesting subject, so i dig a little more. Here [1] is what i found,

Re: Handling Browser Back/Forward Button in Struts2

2009-01-22 Thread Paweł Wielgus
Hi Shekher, it was very interesting subject, so i dig a little more. Here [1] is what i found, with some tests. Basicly it turns out that You should add headers in page and to response. [1] - http://poulwiel.blogspot.com/2009/01/browser-back-button-and-caching-problem.html Best greetings, Paweł

Re: Handling Browser Back/Forward Button in Struts2

2009-01-21 Thread shekher awasthi
Is it possible that either i should only put these header in the logout action where i am removing the session and den redirecting the user to index page something like this HttpServletResponse response=null; response=ServletActionContext.getResponse(); response.setHeader("

Re: Handling Browser Back/Forward Button in Struts2

2009-01-21 Thread shekher awasthi
i tried using setting the eader values but they are not working as expected i can even go and move back using broswer back button. if i will find anything helpfull will share with you till then hard luck :) 2009/1/21 Paweł Wielgus > Hi Shekher, > what i meant is that it can be done from server

Re: Handling Browser Back/Forward Button in Struts2

2009-01-21 Thread Paweł Wielgus
Hi Shekher, what i meant is that it can be done from server side. Check for example Your e-banking application, i did it on mine :-). There, when You press back button browser won't serve You cached page but ask server for fresh one - this is controlled with content-cache and pragma, but i can't be

Re: Handling Browser Back/Forward Button in Struts2

2009-01-21 Thread shekher awasthi
Hi Paweł, thats true it only send request to server if i will refresh the page and for that i have already custom interceptor places which is checking the user object in session in order to confirm that the request is from authorized user but when i make use of back button it serve the page from

Re: Handling Browser Back/Forward Button in Struts2

2009-01-20 Thread Robert Graf-Waczenski
The javascript solution is of course only production-ready if you use it in an application that is safeguarded against access w/o javascript, i.e. you also need an error page that tells the user to enable javascript in order to use your application. We here in our shop do it this way (we need j

Re: Handling Browser Back/Forward Button in Struts2

2009-01-20 Thread shekher awasthi
i tried with javascript and it worked fine for me but still i believe that this is not the best solutions and as mentioned above if javascript is disabled the solution will no longer work so i have to look in to some other solution like setting pragma or cache-control will do? i am just removing

Re: Handling Browser Back/Forward Button in Struts2

2009-01-20 Thread Nils-Helge Garli Hegvik
Did you invalidate the session? Are you setting no cache headers on the response? Nils-H On Tue, Jan 20, 2009 at 12:46 PM, shekher awasthi wrote: > Hi All, > > in the process of developing application using struts 2.0.11, i came across > the problem of handling browser back/forward button. > > T

Re: Handling Browser Back/Forward Button in Struts2

2009-01-20 Thread Paweł Wielgus
Hi Shekher, first try this scenario: 1. logout user 2. back button - check for logs if action was fired 3. refresh page - check for logs if action was fired Most likely only the 3. will fire action because browser will serve cached version of that page. I was about to write that to deal with it You

Re: Handling Browser Back/Forward Button in Struts2

2009-01-20 Thread shekher awasthi
i did what u have suggested other solution is to use set response type in jsp but i want this functionality only when user get logged out in other case it must work is there any better way to deal with this?? On Tue, Jan 20, 2009 at 5:14 PM, Robert Graf-Waczenski wrote: > You don't write if th

Re: Handling Browser Back/Forward Button in Struts2

2009-01-20 Thread Robert Graf-Waczenski
You don't write if the browser back button is supposed to be functional in your application (in many cases it is not, but YMMV). If you want to disable the browser back button, use the code below in all your pages: history.forward(); I'm not aware of any feature in Struts2 that deals with

Handling Browser Back/Forward Button in Struts2

2009-01-20 Thread shekher awasthi
Hi All, in the process of developing application using struts 2.0.11, i came across the problem of handling browser back/forward button. This problem is occurring when we will logout the user.On Clicking the logout button we are currently removing the user from the session and it worked fine for