RE: How do you set cache-control for static (gif, jpg) resources

2004-07-30 Thread Ryan Lissack
Hi, You could write a servlet filter and only map it to those resources in web.xml Ryan -Original Message- From: Keith Bottner [mailto:[EMAIL PROTECTED] Sent: 30 July 2004 13:53 To: [EMAIL PROTECTED] Subject: How do you set cache-control for static (gif, jpg) resources I am trying to f

RE: How do you set cache-control for static (gif, jpg) resources

2004-07-30 Thread Shapira, Yoav
Hi, Tomcat doesn't set any caching headers by itself. To do so, you can write a simple filter (examples of this filter are freely available on the net, it's about 10 LOC) that looks at the response content-type and adds headers as needed. Yoav Shapira Millennium Research Informatics >-Orig

RE: How do you set cache-control for static (gif, jpg) resources

2004-07-30 Thread Keith Bottner
Ok, I wrote a simple filter. No problem. It works! One question. Is there a standard way to determine if your filter is being called during the request chain or during the response chain? If I use response.putHeader(headerName, fc.getInitParameter(headerName)); It will add the header once durin

RE: How do you set cache-control for static (gif, jpg) resources

2004-07-30 Thread Shapira, Yoav
s List' >Subject: RE: How do you set cache-control for static (gif, jpg) resources > >Ok, I wrote a simple filter. No problem. It works! > >One question. Is there a standard way to determine if your filter is being >called during the request chain or during the respo

RE: How do you set cache-control for static (gif, jpg) resources

2004-07-30 Thread Keith Bottner
); } Then I get two additions in the response stream. Any more ideas? Keith -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Friday, July 30, 2004 8:20 AM To: Tomcat Users List Subject: RE: How do you set cache-control for static (gif, jpg) resources Hi, You have to call

RE: How do you set cache-control for static (gif, jpg) resources

2004-07-30 Thread Shapira, Yoav
Hi, >Previously I was calling doChain at the end of my doFilter method. > >Making the change you suggest, calling doChain at the top like >DOES NOT INSERT any of my changes into the response stream. If I do it like >this: >Then I get two additions in the response stream. > >Any more ideas? Tha

Re: How do you set cache-control for static (gif, jpg) resources

2004-07-30 Thread Tim Funk
AM To: 'Tomcat Users List' Subject: RE: How do you set cache-control for static (gif, jpg) resources Ok, I wrote a simple filter. No problem. It works! One question. Is there a standard way to determine if your filter is being called during the request chain or during the response chai

RE: How do you set cache-control for static (gif, jpg) resources

2004-07-30 Thread Keith Bottner
mailto:[EMAIL PROTECTED] Sent: Friday, July 30, 2004 8:40 AM To: Tomcat Users List Subject: RE: How do you set cache-control for static (gif, jpg) resources Hi, >Previously I was calling doChain at the end of my doFilter method. > >Making the change you suggest, calling doChain at the top l

RE: How do you set cache-control for static (gif, jpg) resources

2004-07-30 Thread Shapira, Yoav
--Original Message- >From: Keith Bottner [mailto:[EMAIL PROTECTED] >Sent: Friday, July 30, 2004 9:59 AM >To: 'Tomcat Users List' >Subject: RE: How do you set cache-control for static (gif, jpg) resources > > > >Unfortunately HttpServletResponse has now way to query

RE: How do you set cache-control for static (gif, jpg) resources

2004-07-30 Thread Keith Bottner
m that second server? Yoav Shapira Millennium Research Informatics >-Original Message- >From: Keith Bottner [mailto:[EMAIL PROTECTED] >Sent: Friday, July 30, 2004 9:59 AM >To: 'Tomcat Users List' >Subject: RE: How do you set cache-control for static (gif, jpg) resources &

RE: How do you set cache-control for static (gif, jpg) resources

2004-07-30 Thread Shapira, Yoav
D] >Sent: Friday, July 30, 2004 10:45 AM >To: 'Tomcat Users List' >Subject: RE: How do you set cache-control for static (gif, jpg) resources > >RequestDumperValve dump's the request and the response. > >So the request is first and the response follows the do

RE: How do you set cache-control for static (gif, jpg) resources

2004-07-30 Thread Keith Bottner
er cleanup operations. Thanks for all you help, I appreciate your time. Keith -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Friday, July 30, 2004 9:55 AM To: Tomcat Users List Subject: RE: How do you set cache-control for static (gif, jpg) resources Hi, Yeah,

RE: How do you set cache-control for static (gif, jpg) resources

2004-07-30 Thread Shapira, Yoav
t; > > >Hi, >Yeah, I saw his response, but you didn't mention IllegalStateExceptions in >your log so I assumed the response being committed wasn't the problem >;) Weird. > >Yoav Shapira >Millennium Research Informatics > > >>-Original Message-

RE: How do you set cache-control for static (gif, jpg) resources

2004-07-30 Thread Keith Bottner
, 2004 10:14 AM To: Tomcat Users List Subject: RE: How do you set cache-control for static (gif, jpg) resources Hi, No problem about the help ;) Sadly enough, I know most of the Servlet Spec by heart now. But more importantly, I have filters that do stuff on the request side, check the response

Re: How do you set cache-control for static (gif, jpg) resources

2004-07-30 Thread Dennis Dai
iginal Message- From: Keith Bottner [mailto:[EMAIL PROTECTED] Sent: Friday, July 30, 2004 10:45 AM To: 'Tomcat Users List' Subject: RE: How do you set cache-control for static (gif, jpg) resources RequestDumperValve dump's the request and the response. So the request is first and the re

RE: How do you set cache-control for static (gif, jpg) resources

2004-07-30 Thread Keith Bottner
but, the solution I settled on seems to work. Keith -Original Message- From: Dennis Dai [mailto:[EMAIL PROTECTED] Sent: Friday, July 30, 2004 3:07 PM To: Tomcat Users List Subject: Re: How do you set cache-control for static (gif, jpg) resources I've been reading this thread bac

Re: How do you set cache-control for static (gif, jpg) resources

2004-07-30 Thread Dennis Dai
the solution I settled on seems to work. Keith -Original Message- From: Dennis Dai [mailto:[EMAIL PROTECTED] Sent: Friday, July 30, 2004 3:07 PM To: Tomcat Users List Subject: Re: How do you set cache-control for static (gif, jpg) resources I've been reading this thread back and forth

RE: How do you set cache-control for static (gif, jpg) resources

2004-07-31 Thread Keith Bottner
when they are not set they work much better. Keith -Original Message- From: Dennis Dai [mailto:[EMAIL PROTECTED] Sent: Friday, July 30, 2004 7:18 PM To: Tomcat Users List Subject: Re: How do you set cache-control for static (gif, jpg) resources Keith, This is on one of my development