Re: Lifecycle of a tapestry request and the MarkupRendererFilter

2009-10-16 Thread cordenier christophe
This may sound obvious but why not implementing a StreamResponseAdapter and
extend it for your implementations ?

Although a RequestFilter can be the right place for a front filter, or
modify the ComponentEventResultProcessor that handle the StreamResponse
(maybe more complicated) to automatically add headers... Many ways exist in
fact :)

Regards
Christophe.

2009/10/15 Ian Petzer ian.pet...@ioko.com

 Hi,

 This is exactly how I am currently setting the headers, however I don't
 want to do this on an individual basis for all StreamResponses.

 What I'm looking for a is a filter or similar mechanism that can be used
 to post-process all responses irrespective of whether they are
 StreamResponse objects or the output from normal components with markup
 in a tml file. Essentially a filter like the MarkupRendererFilter that
 works on StreamResponses as well

 Thanks
 Ian



 -Original Message-
 From: cordenier christophe [mailto:christophe.corden...@gmail.com]
 Sent: 15 October 2009 15:31
 To: Tapestry users
 Subject: Re: Lifecycle of a tapestry request and the
 MarkupRendererFilter

 What not using the prepareResponse of the StreamResponse Tapestry
 interface
 to set headers ?

 2009/10/15 Ian Petzer ian.pet...@ioko.com

  Hi,
 
  We do actually have a load balanced caching system sitting in front
 our
  app server, however we control the caching behaviour by setting
 headers
  on the HTTP responses.
 
  For example in this particular case we need to set:
 
 response.setHeader(CACHE_CONTROL_HEADER,
  no-cache);
 response.setHeader(PRAGMA_HEADER,
  No-Cache);
 
 
 
 
 
  -Original Message-
  From: cordenier christophe [mailto:christophe.corden...@gmail.com]
  Sent: 15 October 2009 14:58
  To: Tapestry users
  Subject: Re: Lifecycle of a tapestry request and the
  MarkupRendererFilter
 
  Hello
  From my point of view this kind of caching mechanism should be done in
  front
  of your application server.
 
  Regards
  Christophe.
 
  2009/10/15 Ian Petzer ian.pet...@ioko.com
 
   Hi,
  
  
  
   I have been successfully using the CacheControlMarkupRenderer from
 the
   ioko-tapestry-commons
   http://tapestry.formos.com/projects/ioko-tapestry-commons/
 library.
   This is a java class that implements the MarkupRendererFilter and
   Partial MarkupRendererFilter in order to apply caching headers to
  pages
   served by our application.
  
  
  
   This is all working wonderfully, however we now have a component
 which
   is returning a StreamResponse object out of the onActivate method of
  the
   component. This of course does not invoke the
  renderMarkup(MarkupWriter
   writer, MarkupRenderer renderer) method on the
   CacheControlMarkupRenderer as it is not markup.
  
  
  
   Is there an equivalent filter we could use that would enable us to
 set
   headers on the Response object but would be applied to both
   StreamResponse objects as well as the output from normal components
  with
   markup in a tml file.
  
  
  
   Thanks,
  
   Ian
  
  
 
  -
  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: Lifecycle of a tapestry request and the MarkupRendererFilter

2009-10-15 Thread cordenier christophe
Hello
From my point of view this kind of caching mechanism should be done in front
of your application server.

Regards
Christophe.

2009/10/15 Ian Petzer ian.pet...@ioko.com

 Hi,



 I have been successfully using the CacheControlMarkupRenderer from the
 ioko-tapestry-commons
 http://tapestry.formos.com/projects/ioko-tapestry-commons/  library.
 This is a java class that implements the MarkupRendererFilter and
 Partial MarkupRendererFilter in order to apply caching headers to pages
 served by our application.



 This is all working wonderfully, however we now have a component which
 is returning a StreamResponse object out of the onActivate method of the
 component. This of course does not invoke the renderMarkup(MarkupWriter
 writer, MarkupRenderer renderer) method on the
 CacheControlMarkupRenderer as it is not markup.



 Is there an equivalent filter we could use that would enable us to set
 headers on the Response object but would be applied to both
 StreamResponse objects as well as the output from normal components with
 markup in a tml file.



 Thanks,

 Ian




RE: Lifecycle of a tapestry request and the MarkupRendererFilter

2009-10-15 Thread Ian Petzer
Hi,

We do actually have a load balanced caching system sitting in front our
app server, however we control the caching behaviour by setting headers
on the HTTP responses.

For example in this particular case we need to set:
response.setHeader(CACHE_CONTROL_HEADER,
no-cache);
response.setHeader(PRAGMA_HEADER,
No-Cache);





-Original Message-
From: cordenier christophe [mailto:christophe.corden...@gmail.com] 
Sent: 15 October 2009 14:58
To: Tapestry users
Subject: Re: Lifecycle of a tapestry request and the
MarkupRendererFilter

Hello
From my point of view this kind of caching mechanism should be done in
front
of your application server.

Regards
Christophe.

2009/10/15 Ian Petzer ian.pet...@ioko.com

 Hi,



 I have been successfully using the CacheControlMarkupRenderer from the
 ioko-tapestry-commons
 http://tapestry.formos.com/projects/ioko-tapestry-commons/  library.
 This is a java class that implements the MarkupRendererFilter and
 Partial MarkupRendererFilter in order to apply caching headers to
pages
 served by our application.



 This is all working wonderfully, however we now have a component which
 is returning a StreamResponse object out of the onActivate method of
the
 component. This of course does not invoke the
renderMarkup(MarkupWriter
 writer, MarkupRenderer renderer) method on the
 CacheControlMarkupRenderer as it is not markup.



 Is there an equivalent filter we could use that would enable us to set
 headers on the Response object but would be applied to both
 StreamResponse objects as well as the output from normal components
with
 markup in a tml file.



 Thanks,

 Ian



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



Re: Lifecycle of a tapestry request and the MarkupRendererFilter

2009-10-15 Thread cordenier christophe
What not using the prepareResponse of the StreamResponse Tapestry interface
to set headers ?

2009/10/15 Ian Petzer ian.pet...@ioko.com

 Hi,

 We do actually have a load balanced caching system sitting in front our
 app server, however we control the caching behaviour by setting headers
 on the HTTP responses.

 For example in this particular case we need to set:
response.setHeader(CACHE_CONTROL_HEADER,
 no-cache);
response.setHeader(PRAGMA_HEADER,
 No-Cache);





 -Original Message-
 From: cordenier christophe [mailto:christophe.corden...@gmail.com]
 Sent: 15 October 2009 14:58
 To: Tapestry users
 Subject: Re: Lifecycle of a tapestry request and the
 MarkupRendererFilter

 Hello
 From my point of view this kind of caching mechanism should be done in
 front
 of your application server.

 Regards
 Christophe.

 2009/10/15 Ian Petzer ian.pet...@ioko.com

  Hi,
 
 
 
  I have been successfully using the CacheControlMarkupRenderer from the
  ioko-tapestry-commons
  http://tapestry.formos.com/projects/ioko-tapestry-commons/  library.
  This is a java class that implements the MarkupRendererFilter and
  Partial MarkupRendererFilter in order to apply caching headers to
 pages
  served by our application.
 
 
 
  This is all working wonderfully, however we now have a component which
  is returning a StreamResponse object out of the onActivate method of
 the
  component. This of course does not invoke the
 renderMarkup(MarkupWriter
  writer, MarkupRenderer renderer) method on the
  CacheControlMarkupRenderer as it is not markup.
 
 
 
  Is there an equivalent filter we could use that would enable us to set
  headers on the Response object but would be applied to both
  StreamResponse objects as well as the output from normal components
 with
  markup in a tml file.
 
 
 
  Thanks,
 
  Ian
 
 

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




RE: Lifecycle of a tapestry request and the MarkupRendererFilter

2009-10-15 Thread Ian Petzer
Hi,

This is exactly how I am currently setting the headers, however I don't
want to do this on an individual basis for all StreamResponses. 

What I'm looking for a is a filter or similar mechanism that can be used
to post-process all responses irrespective of whether they are
StreamResponse objects or the output from normal components with markup
in a tml file. Essentially a filter like the MarkupRendererFilter that
works on StreamResponses as well

Thanks
Ian



-Original Message-
From: cordenier christophe [mailto:christophe.corden...@gmail.com] 
Sent: 15 October 2009 15:31
To: Tapestry users
Subject: Re: Lifecycle of a tapestry request and the
MarkupRendererFilter

What not using the prepareResponse of the StreamResponse Tapestry
interface
to set headers ?

2009/10/15 Ian Petzer ian.pet...@ioko.com

 Hi,

 We do actually have a load balanced caching system sitting in front
our
 app server, however we control the caching behaviour by setting
headers
 on the HTTP responses.

 For example in this particular case we need to set:

response.setHeader(CACHE_CONTROL_HEADER,
 no-cache);
response.setHeader(PRAGMA_HEADER,
 No-Cache);





 -Original Message-
 From: cordenier christophe [mailto:christophe.corden...@gmail.com]
 Sent: 15 October 2009 14:58
 To: Tapestry users
 Subject: Re: Lifecycle of a tapestry request and the
 MarkupRendererFilter

 Hello
 From my point of view this kind of caching mechanism should be done in
 front
 of your application server.

 Regards
 Christophe.

 2009/10/15 Ian Petzer ian.pet...@ioko.com

  Hi,
 
 
 
  I have been successfully using the CacheControlMarkupRenderer from
the
  ioko-tapestry-commons
  http://tapestry.formos.com/projects/ioko-tapestry-commons/
library.
  This is a java class that implements the MarkupRendererFilter and
  Partial MarkupRendererFilter in order to apply caching headers to
 pages
  served by our application.
 
 
 
  This is all working wonderfully, however we now have a component
which
  is returning a StreamResponse object out of the onActivate method of
 the
  component. This of course does not invoke the
 renderMarkup(MarkupWriter
  writer, MarkupRenderer renderer) method on the
  CacheControlMarkupRenderer as it is not markup.
 
 
 
  Is there an equivalent filter we could use that would enable us to
set
  headers on the Response object but would be applied to both
  StreamResponse objects as well as the output from normal components
 with
  markup in a tml file.
 
 
 
  Thanks,
 
  Ian
 
 

 -
 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: Lifecycle of a tapestry request and the MarkupRendererFilter

2009-10-15 Thread Ulrich Stärk
http://tapestry.formos.com/nightly/tapestry5/guide/request.html gives an 
overview of how a request goes through the various pipelines and 
dispatchers.


Uli

Ian Petzer schrieb:

Hi,

 


I have been successfully using the CacheControlMarkupRenderer from the
ioko-tapestry-commons
http://tapestry.formos.com/projects/ioko-tapestry-commons/  library.
This is a java class that implements the MarkupRendererFilter and
Partial MarkupRendererFilter in order to apply caching headers to pages
served by our application.

 


This is all working wonderfully, however we now have a component which
is returning a StreamResponse object out of the onActivate method of the
component. This of course does not invoke the renderMarkup(MarkupWriter
writer, MarkupRenderer renderer) method on the
CacheControlMarkupRenderer as it is not markup.

 


Is there an equivalent filter we could use that would enable us to set
headers on the Response object but would be applied to both
StreamResponse objects as well as the output from normal components with
markup in a tml file.

 


Thanks,

Ian





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