Clay Leeds wrote:
On Jan 20, 2006, at 6:28 AM, Jeroen van der Vegt wrote:

I'm not sure I correctly understand the problem anymore, but this might be relevant:

Can't you let the JPEG servlet indicate that its output should not be cached? I use this code to disable various cache mechanism:

   private void setNoCache(HttpServletResponse resp) {
       resp.setHeader("Pragma","No-Cache");
       resp.setHeader("Cache-Control","no-Cache");
       resp.setDateHeader("Expires", 0 );
   }

Regards,

Jeroen


I understood the OP (pasted at the bottom of this msg) to mean there is a caching problem with the JPEG image of each chart.


Are you sure? The proxy/client is getting only a PDF document (MIME type application/pdf), no JPEGs. The JPEGs are incorporated within the PDF documents. Nothing is sent to the proxy/client until the PDF document is finished (would have to be, if only to solve the "Page 1 of XXX" resolution issues.) I would think the proxy/client would be completely oblivious to the fact that the PDF contains JPEGs within it when it receives the application/pdf stream.

No problem whatsoever with the rest of what you're saying, just this premise.

Glen

My previous post supported Jeremias 'simple' fix whereby each chart be given a different URI (PATH, name, etc.)--even if the difference is just 'dummy' text. I still believe this is the case.

While you can set special caching parameters on the server end (such as described by Jeroen above), unless there is a change in the URI/PATH/Filename, there are other places where the file might be cached (thereby negating any 'NEVER CACHE THIS RESOURCE' settings).

I attended a talk by Michael Radwin, Senior Engineering Manager for Yahoo, at ApacheCon US 2005 in San Diego[1], entitled 'HTTP Caching and Cache-busting for Content Publishers'. Among other things, Y! needs to ensure that multiple users at an Internet Cafe checking their mail will *never* receive the same content.

On Jan 18, 2006, at 12:32 AM, vijay visu wrote:

i am doing a code which generates the PDF in a batch
process.
These PDFs include dynamically built charts by
servlets. I am making use of external-graphic tag to pick the
images.
These servlets throw jpeg image of the charts in the
output stream.

These servlets should be called for each PDFs
generated since each chart will be unique.
My problem is that the servlets which builds the
dynamic charts are called for the first time only. On the subsequent calls the old charts are only built in PDF and the servlets are not getting
called.

Please help me out in this problem


[1] (click on 'Cache-busting techniques' at the bottom of the navigation)
http://public.yahoo.com/~radwin/talks/http-caching-apachecon2005.htm



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to