Re: Problem with securing ajax enabled Tapestry pages with Annotations ...

2012-02-01 Thread Gunnar Eketrapp
Thanks Kalle! That solved my ajax securing problem. /Gunnar Den tisdagen den 17:e januari 2012 skrev Kalle Korhonen< kalle.o.korho...@gmail.com>: > On Thu, Aug 25, 2011 at 1:08 AM, Gunnar Eketrapp > wrote: >> I still havn't managde to get ajax calls to redirect. >> I changed to reload as a I sa

Re: Problem with securing ajax enabled Tapestry pages with Annotations ...

2012-01-16 Thread Kalle Korhonen
On Thu, Aug 25, 2011 at 1:08 AM, Gunnar Eketrapp wrote: > I still havn't managde to get ajax calls to redirect. > I changed to reload as a I saw in this mailing list. > In Chromes debugger I can see that the timed out ajax call returns .. > {"script":"window.location.reload();"} > ... but nothing

Re: Problem with securing ajax enabled Tapestry pages with Annotations ...

2011-08-25 Thread Taha Hafeez
Hi This may not be the best solution but here is what I have done and it works for me .. I am using a custom tapestry.js with this addition to the ajaxRequest call if (Tapestry.windowUnloaded) return;

Re: Problem with securing ajax enabled Tapestry pages with Annotations ...

2011-08-25 Thread Gunnar Eketrapp
I still havn't managde to get ajax calls to redirect. I changed to reload as a I saw in this mailing list. In Chromes debugger I can see that the timed out ajax call returns .. {"script":"window.location.reload();"} ... but nothing happens on the client side. So the question is still open do I

Re: Problem with securing ajax enabled Tapestry pages with Annotations ...

2011-08-23 Thread Magnus Kvalheim
No sorry, that's not relevant for this. Eager to help, but I should have paid more attention to detail :) On Wed, Aug 24, 2011 at 8:33 AM, Magnus Kvalheim wrote: > I sometimes use a proxy for doing redirects. > > *public class RedirectProxy {* > * @Persist private String redirectURL;* > * @Injec

Re: Problem with securing ajax enabled Tapestry pages with Annotations ...

2011-08-23 Thread Magnus Kvalheim
I sometimes use a proxy for doing redirects. *public class RedirectProxy {* * @Persist private String redirectURL;* * @Inject private ComponentResources _resources;* * Object onActivate(){* * try {* * URL url = new URL(redirectURL);* * return url;* * } catch (Exception e) {* * // TODO: handle exce

Re: Problem with securing ajax enabled Tapestry pages with Annotations ...

2011-08-23 Thread Gunnar Eketrapp
Hum .. this did not work so I guess I have to do something on the client side as well ... if (request.isXHR()) { OutputStream os = response.getOutputStream("application/json;charset=UTF-8"); os.write(("{\"script\":\"window.location.replace('" + link.toAbs

Re: Problem with securing ajax enabled Tapestry pages with Annotations ...

2011-08-23 Thread Kalle Korhonen
On Mon, Aug 22, 2011 at 4:42 PM, Howard Lewis Ship wrote: > Actually, perhaps Tapestry's client-side support should, by default, > handle 302 correctly. Yes, perhaps so. But the correctness is "in the eye of the beholder". It's clear that a 302 response to a non-ajax request always causes a redir

Re: Problem with securing ajax enabled Tapestry pages with Annotations ...

2011-08-23 Thread Gunnar Eketrapp
Thanks a lot! I think I found what I needed in ConfigurableRequestExceptionHa ndler.java

Re: Problem with securing ajax enabled Tapestry pages with Annotations ...

2011-08-22 Thread Howard Lewis Ship
Actually, perhaps Tapestry's client-side support should, by default, handle 302 correctly. Currently, Tapestry's JSON response for partial page updates includes a special key for performing a redirect. On Mon, Aug 22, 2011 at 2:20 PM, Kalle Korhonen wrote: > On Mon, Aug 22, 2011 at 1:27 PM, Gunn

Re: Problem with securing ajax enabled Tapestry pages with Annotations ...

2011-08-22 Thread Kalle Korhonen
On Mon, Aug 22, 2011 at 1:27 PM, Gunnar Eketrapp wrote: > I just rewrote my very old ProtectedPageGateKeeper that implemented > Dispatcher with a new one > inspired by Howard's blog > http://tapestryjava.blogspot.com/search/label/security > The new one implements ComponentRequestFilter and is bett

Problem with securing ajax enabled Tapestry pages with Annotations ...

2011-08-22 Thread Gunnar Eketrapp
I just rewrote my very old ProtectedPageGateKeeper that implemented Dispatcher with a new one inspired by Howard's blog http://tapestryjava.blogspot.com/search/label/security The new one implements ComponentRequestFilter and is better suited for protecting ajax enabled pages. So I thought ... Now