Re: Tapestry 5 - cache issue when accessed via proxy

2011-03-22 Thread sunmoor007
Hi All We have managed to resolve the URL issue using the LinkCreationHubinterface. Instead of build method, we need to have a decorator method for LinkCreationHub. I have observed that LinkCreationHub is created by TapestryModule, hence we just need to have a decorator method to add our listener

Re: Tapestry 5 - cache issue when accessed via proxy

2011-03-20 Thread sunmoor007
Hi Martin We did try setting the cache headers but it didnt work. Moreover this application works fine when accessed directly. The problem comes only when the application is accessed via proxy server. Thats the reason i have suspected the URL. We did a workaround at proxy server setting level so

Re: Tapestry 5 - cache issue when accessed via proxy

2011-03-18 Thread Martin Strand
On Fri, 18 Mar 2011 12:39:03 +0100, Thiago H. de Paula Figueiredo wrote: On Fri, 18 Mar 2011 01:25:43 -0300, sunmoor007 wrote: Added the below method to AppModule.java public LinkCreationListener buildLinkCreationListener( LinkCreationHub hub) { Make the method

Re: Tapestry 5 - cache issue when accessed via proxy

2011-03-18 Thread Thiago H. de Paula Figueiredo
On Fri, 18 Mar 2011 01:25:43 -0300, sunmoor007 wrote: Added the below method to AppModule.java public LinkCreationListener buildLinkCreationListener( LinkCreationHub hub) { Make the method static and try again please. LinkCreationListener listener =

Re: Tapestry 5 - cache issue when accessed via proxy

2011-03-17 Thread sunmoor007
Added the below method to AppModule.java public LinkCreationListener buildLinkCreationListener( LinkCreationHub hub) { LinkCreationListener listener = new MyLinkCreationListenerImpl(); hub.addListener(listener); return l

Re: Tapestry 5 - cache issue when accessed via proxy

2011-03-17 Thread sunmoor007
Added the below method to AppModule.java public LinkCreationListener buildLinkCreationListener( LinkCreationHub hub) { LinkCreationListener listener = new MyLinkCreationListenerImpl(); hub.addListener(listener); return liste

Re: Tapestry 5 - cache issue when accessed via proxy

2011-03-17 Thread Thiago H. de Paula Figueiredo
On Thu, 17 Mar 2011 10:57:06 -0300, sunmoor007 wrote: I also got the option what Thiago has suggested. I have created a method call buildLinkListener which takes LinkCreationHub as argument and returns a LinkCreationListener object. One thing still am clueless is how to integrate this in ap

Re: Tapestry 5 - cache issue when accessed via proxy

2011-03-17 Thread sunmoor007
Thanks Rich. I also got the option what Thiago has suggested. I have created a method call buildLinkListener which takes LinkCreationHub as argument and returns a LinkCreationListener object. One thing still am clueless is how to integrate this in app module so that this method gets invoked for al

Re: Tapestry 5 - cache issue when accessed via proxy

2011-03-16 Thread Rich M
On 03/16/2011 01:48 PM, sunmoor007 wrote: Hi Rich Thanks. I understood the implementation of listener but i was looking at a way to integrate it so that all URL's in app gets modified. I understand that in app module we can plugin any service. Assume i have a impl class implementing the listener

Re: Tapestry 5 - cache issue when accessed via proxy

2011-03-16 Thread Thiago H. de Paula Figueiredo
Something like this (not tested): public static MyLinkCreationListener buildMyLinkCreationListener(LinkCreationHub hub) { MyLinkCreationLister listener = new MyLinkCreationListener(); hub.addListener(listener); return listener; } On Wed, 16 Mar 2011 14:48:33 -0300, sun

Re: Tapestry 5 - cache issue when accessed via proxy

2011-03-16 Thread sunmoor007
Hi Rich Thanks. I understood the implementation of listener but i was looking at a way to integrate it so that all URL's in app gets modified. I understand that in app module we can plugin any service. Assume i have a impl class implementing the listener interface, how will i integrate it into exi

Re: Tapestry 5 - cache issue when accessed via proxy

2011-03-16 Thread Rich M
The following is an internal Tapestry implementation of LinkCreationListener and a related class that the implementation makes use of. Maybe this can help you get on your way. http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/servic

Re: Tapestry 5 - cache issue when accessed via proxy

2011-03-16 Thread sunmoor007
Hi Thiago Thanks again for your response. Will definitely try using LinkCreationListener/LinkCreationHub . Is it something which needs to be integrated in AppModule. I am relatively very new to Tapestry. Would really appreciate if you can provide a sample implementation for LinkCreationListener.

Re: Tapestry 5 - cache issue when accessed via proxy

2011-03-15 Thread Thiago H. de Paula Figueiredo
On Tue, 15 Mar 2011 09:28:21 -0300, sunmoor007 wrote: Hi Thiago Hi! Thanks for the response. I checked the blog but it talks only about incoming url. Tapestry has outgoing URL rewriting too, but it's just not documented yet. Maybe for your scenario it's easier to create a LinkCreationLis

Re: Tapestry 5 - cache issue when accessed via proxy

2011-03-15 Thread sunmoor007
Hi Thiago Thanks for the response. I checked the blog but it talks only about incoming url. What about the redirect url's. Do we have a control over it. I observed that because of the redirect after post patten in tapestry, i see that for a simple action request there are two requests to the serve

Re: Tapestry 5 - cache issue when accessed via proxy

2011-03-15 Thread Thiago H. de Paula Figueiredo
On Tue, 15 Mar 2011 04:27:28 -0300, sunmoor007 wrote: Hi All Hi! we have checked the proxy logs and issue seems to be because of the presence of proxy server. Proxy server caches the url. As we dont have the search criteria in the url, Why not? That's the best approach in most scenari

Re: Tapestry 5 - cache issue when accessed via proxy

2011-03-15 Thread sunmoor007
Hi All we have checked the proxy logs and issue seems to be because of the presence of proxy server. Proxy server caches the url. As we dont have the search criteria in the url, the same url is getting passed. We modified few settings in proxy server so that our app url doesnt get cached. It worke

Re: Tapestry 5 - cache issue when accessed via proxy

2011-02-23 Thread sunmoor007
Yes Josh. Thats the only option we are trusting upon because setting "no-cache" related option in header doesnt seems to be working. Thanks Sundar -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p3396707.html Sent

Re: Tapestry 5 - cache issue when accessed via proxy

2011-02-23 Thread sunmoor007
Hi Pablo Appreciate your response. We tried the option you mentioned but strangely still seeing the problem. We are still exploring other options. thanks Sundar -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p339

Re: Tapestry 5 - cache issue when accessed via proxy

2011-02-21 Thread Josh Canfield
> Considering the option you mentioned, am guessing if we can add some dynamic > parameter in url which changes for each request which should resolve the > problem. You should consider putting your search terms in the url either as a path parameter or a query parameter so that you can take advanta

Re: Tapestry 5 - cache issue when accessed via proxy

2011-02-21 Thread Pablo dos Reis
If your problem occurs in multiple pages I recommend put the cache configuration in your AppModule. public RequestFilter cacheFilter() { return new RequestFilter() { public boolean service(Request request, Response response, RequestHandler handler) throws I

Re: Tapestry 5 - cache issue when accessed via proxy

2011-02-20 Thread Martin Strand
If you want to use the exact same URL to serve different content, you'll need to make sure the response is never cached by the client. Add appropriate HTTP headers to the response: @Inject private Response response; void onActivate(...) { response.setHeader("Cache-Control", "no-cache"); re

Re: Tapestry 5 - cache issue when accessed via proxy

2011-02-20 Thread sunmoor007
Hi Richard Thanks for your response. I dont really suspect the database part here because it works fine without proxy server. I will take a look at the server/proxy logs. That should give some hint. Will keep you guys updated. Thanks Sundar -- View this message in context: http://tapestry.10

Re: Tapestry 5 - cache issue when accessed via proxy

2011-02-20 Thread sunmoor007
Hi Josh Thanks for your response. You're right. We dont have the search parameter in the URL but wondering how does it work in a scenario where there no proxy server. I have seen an option disableCaching. If i enable that, will it work. Considering the option you mentioned, am guessing if we ca

Re: Tapestry 5 - cache issue when accessed via proxy

2011-02-17 Thread Richard Hill
Yes, difficult to diagnose with only this information. I can only suggest the obvious: check both proxy server logs and your servlet container logs to make sure the request is being received and forwarded correctly. Check what parameters/search queries is being actually passed into your tapestry a

Re: Tapestry 5 - cache issue when accessed via proxy

2011-02-17 Thread Josh Canfield
You haven't given us a lot to work with so I'll speculate that you're app doesn't keep the search parameters in the URL after the redirect-after-post so the browser is always fetching the same url. Have you tried looking at the proxy logs to see what its doing? On Feb 16, 2011 11:17 PM, "sunmoor0