Hi Ravi,
Insert an expire header to your response:
response.addHeader("Expires", "January 1, 1970, 00:00:00 GMT");
(the preferred date format is described by RFC-1123).
or shorter:
response.addDateHeader("Expires", 0);
Both defined in javax.servlet.http.HttpServletResponse since Servlet API 2.2
The result will be something like this:
HTTP/1.1 200
Date: Mon, 18 Jun 2001 11:05:47 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
The rest is up to the client.
Chris
>
> Hi All,
> Can some body please help me? I want to write a servlet and its required
> that browser should always send request to server
> and not use cached copy.
> How to do that?
> Ravi
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets