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

Servlet getting cached

Sajee Joseph
Ranch Hand

Joined: Jan 17, 2001
Posts: 200

I have an applet that invokes a servlet and send its a parameter 'EmpId'
This servlet gets called several times in my application with different values for EmpId. However i notice that the servlet doesnt get called sometimes. Is there a possibility that My servlet is getting cached ??
If so how can i overcome this??.

Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
It is quite possible that a proxy server somewhere caches the output of your servlet and returns that instead of calling the servlet when the same servlet with the same parameters is called again.

There's very little that can be done about it. Setting no-cache or expiration request headers and/or meta tags can sometimes help but some proxies simply ignore those.

I agree. Here's the link:
subject: Servlet getting cached
It's not a secret anymore!