Tomcat Newbie, need help with caching

J

JerryJ

I am new to Tomcat. I have a Tomcat web site that generates PDF
documents dynamically. I am having trouble because, once the PDF is
generated, Tomcat caches the output file and sends the same one to the
web client. I need to shut this off so the PDF can be regenerated from
new data on each request.

In the server.xml file under the <Host> element, I've added a <Context>
element to attempt to shut this off (see below). However, the output
still is cached unless I shut down then restart.

Your solution will be appreciated!

<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

<Context path="/MyWebFolder" docBase="BookBuild" debug="0"
reloadable="true" cachingAllowed="false" cacheMaxSize="0"/>
 
J

Juha Laiho

JerryJ said:
I am new to Tomcat. I have a Tomcat web site that generates PDF
documents dynamically. I am having trouble because, once the PDF is
generated, Tomcat caches the output file and sends the same one to the
web client. I need to shut this off so the PDF can be regenerated from
new data on each request.

Tomcat by itself does not generate PDF. You say "caches the output file";
are you certain that this is not the functionality of your PDF generator?
 
J

JerryJ

The web site I created using Cocoon (a servlet that runs in apache)
generates the PDF on client request. The pdf when complete gets sent to
the client. The next time the client requests the document using the
same URL, apache will send back exactly the same file using the its
file cache.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,113
Latest member
KetoBurn
Top