File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Disabling servlet caching Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Disabling servlet caching" Watch "Disabling servlet caching" New topic

Disabling servlet caching

Ankit Gandhi

Joined: Nov 03, 2006
Posts: 27

We are facing a very typical problem using WebSphere server. The feature of Servlet Caching is enabled on the server side.

How do I disable the same using some code? For running a particular servlet, I want that caching should not come in picture. And everytime the servlet should run.

Any pointers would be helpful.

David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Are you refering to the servlet instance or the output of the servlet?
Ankit Gandhi

Joined: Nov 03, 2006
Posts: 27
The output of the servlet
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Are you sure it's the server caching and not the browser?

Our JSP FAQ has an entry on caching.
I has the necessary meta tags to add to your pages to prevent browser caching.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: Disabling servlet caching
It's not a secret anymore!