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 to existing listener.

public LinkCreationHub decorateLinkCreationHub(LinkCreationHub hub)
{
LinkCreationListener listener = new MyLinkCreationListenerImpl();
hub.addListener(listener);
return hub;
}

This fix has ensured that all page, component event links are appended with
a dynamic paramter in url. Thanks to all who have provided their valuable
suggestion. Special thanks to Thiago for giving the hint about
LinkCreationListener.

Thanks
Sundar

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p4250743.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Tapestry 5 - cache issue when accessed via proxy

2011-03-21 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 that all requests with
a particular path wont be cached by proxy server. This did work but we are
looking forward for a fix from application point of view instead of relying
the proxy server setting workaround.

Thanks
Sundar


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p4191583.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 sunmoo...@gmail.com wrote:


Added the below method to AppModule.java

public LinkCreationListener buildLinkCreationListener(
LinkCreationHub hub) {


Make the method static and try again please.



LinkCreationListener listener = new
MyLinkCreationListenerImpl();
hub.addListener(listener);
return listener;
}


Created a sample impl class something like one below..

package test.abc

import org.apache.tapestry5.Link;
import org.apache.tapestry5.services.LinkCreationListener;

public class MyLinkCreationListenerImpl implements LinkCreationListener {

public void createdComponentEventLink(Link arg0) {
arg0.addParameter(test,
String.valueOf(System.currentTimeMillis()));

}

public void createdPageRenderLink(Link arg0) {
arg0.addParameter(test,
String.valueOf(System.currentTimeMillis()));

}

}

I assumed the above code should be sufficient to provide link creation
service as i have even kept the method name using the notation
build+service name. Despite that i observed that url is not getting
modified at all. Would be really helpful if you can provide some inputs  
on

this.

--
View this message in context:  
http://tapestry.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p3929745.html

Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org




--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
Consultor, desenvolvedor e instrutor em Java, Tapestry e Hibernate
Coordenador e professor da Especialização em Engenharia de Software com  
Ênfase em Java da Faculdade Pitágoras

http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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  
thiag...@gmail.com wrote:


On Fri, 18 Mar 2011 01:25:43 -0300, sunmoor007 sunmoo...@gmail.com  
wrote:



Added the below method to AppModule.java

public LinkCreationListener buildLinkCreationListener(
LinkCreationHub hub) {


Make the method static and try again please.


Builder methods do not need to be static.


Either way, this thread is based on a false premise:

I believe the only way to prevent the proxy server caching links is to  
have
a dynamic parameter in url so that everytime proxy server identifies it  
as a

new request and hence it wont cache.


That is simply not true. Any working proxy server would never cache a  
response which has appropriate headers such as Cache-Control: no-cache or  
no-store.
If this really isn't working you should dig deeper and find out why, e.g.  
are you sure the headers were really added to the response?

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 all URL creation. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p3880003.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 sunmoo...@gmail.com 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 app module so that this method gets invoked for  
all URL creation.


I need to do nothing, as you already created the method and added your  
LinkCreationListener implementation to the LinkCreationHub.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 listener;
} 


Created a sample impl class something like one below..

package test.abc

import org.apache.tapestry5.Link;
import org.apache.tapestry5.services.LinkCreationListener;

public class MyLinkCreationListenerImpl implements LinkCreationListener {

public void createdComponentEventLink(Link arg0) {
arg0.addParameter(test, 
String.valueOf(System.currentTimeMillis()));

}

public void createdPageRenderLink(Link arg0) {
arg0.addParameter(test, 
String.valueOf(System.currentTimeMillis()));

}

}

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p3929002.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 listener; 
} 


Created a sample impl class something like one below.. 

package test.abc 

import org.apache.tapestry5.Link; 
import org.apache.tapestry5.services.LinkCreationListener; 

public class MyLinkCreationListenerImpl implements LinkCreationListener { 

public void createdComponentEventLink(Link arg0) { 
arg0.addParameter(test,
String.valueOf(System.currentTimeMillis())); 

} 

public void createdPageRenderLink(Link arg0) { 
arg0.addParameter(test,
String.valueOf(System.currentTimeMillis())); 

} 

} 

I assumed the above code should be sufficient to provide link creation
service as i have even kept the method name using the notation
build+service name. Despite that i observed that url is not getting 
modified at all. Would be really helpful if you can provide some inputs on
this.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p3929745.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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. 

Thanks
Sundar

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p3782668.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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/services/ClientPersistentFieldStrategy.java?view=markup

http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ClientPersistentFieldStorageImpl.java?view=markup

On 03/16/2011 10:26 AM, sunmoor007 wrote:

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.

Thanks
Sundar

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p3782668.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 existing
application so that all URL's have a dynamic parameter, say system time in
milliseconds appended to the url.

The reason am trying to add the system time is to ensure that everytime a
dynamic value is appended to url and hence proxy server wont cache and show
me stale data which is currently happening.

Thanks
Sundar 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p3790608.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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, sunmoor007 sunmoo...@gmail.com 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 interface, how will i integrate it into  
existing
application so that all URL's have a dynamic parameter, say system time  
in

milliseconds appended to the url.

The reason am trying to add the system time is to ensure that everytime a
dynamic value is appended to url and hence proxy server wont cache and  
show

me stale data which is currently happening.

Thanks
Sundar

--
View this message in context:  
http://tapestry.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p3790608.html

Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org




--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
Consultor, desenvolvedor e instrutor em Java, Tapestry e Hibernate
Coordenador e professor da Especialização em Engenharia de Software com  
Ênfase em Java da Faculdade Pitágoras

http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 interface, how will i integrate it into existing
application so that all URL's have a dynamic parameter, say system time in
milliseconds appended to the url.

Referencing these lines from ClientPersistentFieldStorageImpl.java:

135 public void updateLink(Link link)
136 {
137 refreshClientData();
138 
139 if (clientData != null) link.addParameter(PARAMETER_NAME, clientData);
140 }


You can see that the Link object has an addParameter function. You 
should be able to use this to add the system time to the URL as a 
parameter, from my understanding. Since you understand the 
implementation of listener, then that should be pretty simple.


It seems the last challenge you are facing is how you should setup your 
implementation of the listener in the Module so it will be used on link 
creation. That is a little bit beyond my scope of knowledge here, so 
I'll defer that answer to someone else.



The reason am trying to add the system time is to ensure that everytime a
dynamic value is appended to url and hence proxy server wont cache and show
me stale data which is currently happening.

Thanks
Sundar

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p3790608.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 worked
fine without any issue, though changing proxy server setting is not a
feasible solution considering the fact that this application will be used by
various users across the globe.

I believe the only way to prevent the proxy server caching links is to have
a dynamic parameter in url so that everytime proxy server identifies it as a
new request and hence it wont cache.

Is there a way in Tapestry to dynamically include a parameter in url. This
dynamic parameter, say a timezone will be appended for each and every
request url(including redirected one's).

Would really appreciate if guys can provide your inputs on the same.

Thanks
Sundar


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p3681523.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 sunmoo...@gmail.com 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 scenarios, avoids session use  
and prevents the caching issue.



Is there a way in Tapestry to dynamically include a parameter in url.


Yes. See  
http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/. In  
your case, you just need to add the query parameter. Another option is to  
return this parameter in the passivate event (onPassivate).


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 server. The second one
is a redirect request. 

Will anyway look at the second option you have mentioned.

Thanks again for your input.

thanks
Sundar

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p3702496.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 sunmoo...@gmail.com 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 LinkCreationListener and  
add it to the LinkCreationHub service.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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-tp3388994p3396694.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 IOException {
response.setHeader(Cache-Control,no-cache);
//HTTP 1.1
response.setHeader(Pragma,no-cache); //HTTP
1.0
response.setDateHeader (Expires, 0); //prevents
caching
response.setHeader(Cache-Control,no-store);
//HTTP 1.1
return handler.service(request, response);
}
};
   }



2011/2/21 Martin Strand do.not.eat.yellow.s...@gmail.com

 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);
  response.setDateHeader(Expires, 0);

 }




 On Mon, 21 Feb 2011 05:11:43 +0100, sunmoor007 sunmoo...@gmail.com
 wrote:


 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 can add some
 dynamic
 parameter in url which changes for each request which should resolve the
 problem.

 I will anyway check the proxy logs.

 Thanks
 Sundar


 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org




-- 
Pablo Henrique dos Reis


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 advantage of
caching. Unless it's user specific data which you don't want exposed,
then you want to tell the proxy not to cache using the appropriate
http headers.

Either way it's worthwhile to learn about the built in HTTP caching
options so that you can be sure you're using it correctly.

Josh


On Sun, Feb 20, 2011 at 8:11 PM, sunmoor007 sunmoo...@gmail.com wrote:

 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 can add some dynamic
 parameter in url which changes for each request which should resolve the
 problem.

 I will anyway check the proxy logs.

 Thanks
 Sundar

 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p3393672.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 can add some dynamic
parameter in url which changes for each request which should resolve the
problem.

I will anyway check the proxy logs.

Thanks
Sundar

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p3393672.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p3393674.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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);
  response.setDateHeader(Expires, 0);
}




On Mon, 21 Feb 2011 05:11:43 +0100, sunmoor007 sunmoo...@gmail.com wrote:



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 can add some  
dynamic

parameter in url which changes for each request which should resolve the
problem.

I will anyway check the proxy logs.

Thanks
Sundar


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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, sunmoor007 sunmoo...@gmail.com wrote:

 Hello All

 We have developed a web application using Tapestry 5. We are facing a
 caching issue when we try to access the application via a proxy. When we
 access the application directly i.e without going via a proxy server,
 everything is working fine.

 when we access via proxy we are seeing this problem. A simple example is a
 search screen. We first seach using a criteria and appilcation returned a
 result. Later when we search using a different criteria we are seeing the
 old entries in page. When we do a refresh or CTRL f5 manually, we are
seeing
 the updated values.

 Is there any solution or workaround to this problem from Tapestry 5 point
of
 view. Would really appreciate if you can help on this.

 thanks
 Sundar
 --
 View this message in context:
http://tapestry.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p3388994.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org



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 app. Check what queries/parameters are being passed
to your db or index or other data store. Do you have any db or indexing
caching layer? And finally check what you are caching in tapestry itself
- e.g @Persist'd fields, SSOs etc.

R.


On Thu, 2011-02-17 at 06:21 -0800, Josh Canfield wrote:
 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, sunmoor007 sunmoo...@gmail.com wrote:
 
  Hello All
 
  We have developed a web application using Tapestry 5. We are facing a
  caching issue when we try to access the application via a proxy. When we
  access the application directly i.e without going via a proxy server,
  everything is working fine.
 
  when we access via proxy we are seeing this problem. A simple example is a
  search screen. We first seach using a criteria and appilcation returned a
  result. Later when we search using a different criteria we are seeing the
  old entries in page. When we do a refresh or CTRL f5 manually, we are
 seeing
  the updated values.
 
  Is there any solution or workaround to this problem from Tapestry 5 point
 of
  view. Would really appreciate if you can help on this.
 
  thanks
  Sundar
  --
  View this message in context:
 http://tapestry.1045711.n5.nabble.com/Tapestry-5-cache-issue-when-accessed-via-proxy-tp3388994p3388994.html
  Sent from the Tapestry - User mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org