Hi Nitin,
U can set it like this.


/* Prevent the page from being cached by browser */
        response.setDateHeader("Expires",0);
        response.setHeader("Pragma","no-cache");
        if (request.getProtocol().equals("HTTP/1.1"))
                response.setHeader("Cache-Control","no-cache");
------------------------

If U any questions  other than this please let me know.

Thanks ,
Durai.

>From: Nitin Khattar <[EMAIL PROTECTED]>
>Reply-To: "A mailing list for discussion about Sun Microsystem's Java
>        Servlet API Technology." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: ' Expires'  - response Header
>Date: Mon, 18 Sep 2000 18:46:12 +0530
>MIME-Version: 1.0
>Received: from [204.160.241.38] by hotmail.com (3.2) with ESMTP id
>MHotMailBB8F611D0047D82197A8CCA0F126E3A70; Mon Sep 18 06:20:30 2000
>Received: from mail (mail.javasoft.com [204.160.241.28])by
>mail2.java.sun.com (8.10.0.Beta13+Sun/8.10.0.Beta13) with ESMTP id
>e8IDIsF15082;Mon, 18 Sep 2000 06:18:54 -0700 (PDT)
>Received: from JAVA.SUN.COM by JAVA.SUN.COM (LISTSERV-TCP/IP release 1.8d)
>with          spool id 1323298 for [EMAIL PROTECTED]; Mon, 18
>Sep 2000          06:19:57 -0700
>Received: from bluemartini.com (relay.bluemartini.com [209.157.139.20]) by
>         mail.java.sun.com (8.10.0.Beta13+Sun/8.10.2) with ESMTP id
>  e8IDFsj22373 for <[EMAIL PROTECTED]>; Mon, 18 Sep 2000
>   06:15:54 -0700 (PDT)
>Received: from lemon.bluemartini.com (mail.bluemartini.com [10.175.0.14])
>by          bluemartini.com (8.9.3+Sun/8.9.1) with ESMTP id GAA20982 for
>       <[EMAIL PROTECTED]>; Mon, 18 Sep 2000 06:14:14 -0700
>(PDT)
>Received: from dell4 ([192.168.50.76]) by lemon.bluemartini.com (Netscape
>        Messaging Server 4.15) with SMTP id G133FN00.JL3 for
><[EMAIL PROTECTED]>; Mon, 18 Sep 2000 06:14:11 -0700
>From [EMAIL PROTECTED] Mon Sep 18 06:24:22 2000
>References: <[EMAIL PROTECTED]>
><059a01c0215b$ab5f3d60$[EMAIL PROTECTED]>
><[EMAIL PROTECTED]>
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Mailer: Microsoft Outlook Express 5.00.2919.6600
>X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
>Message-ID:  <076e01c02172$a148b920$[EMAIL PROTECTED]>
>Sender: "A mailing list for discussion about Sun Microsystem's Java
>      Servlet API Technology." <[EMAIL PROTECTED]>
>
>Christopher
>
>Quite Respectfully and very politely....
>
>I searched the archive for September,August and July but couldn't find any
>post which even remotely mentions about the 'Expires' header, let alone any
>description of how to set it.
>
>thanks
>Nitin
>----- Original Message -----
>From: "Christopher K. St. John" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Monday, September 18, 2000 5:34 PM
>Subject: Re: ' Expires' - response Header
>
>
> > Nitin Khattar wrote:
> > >
> > > Can anyone tell me how to set the 'Expires' Header response header?
> > > I want my page to expire after a fixed time say 5 minutes.
> > > How do i do it?
> > >
> >
> >  This exact question was asked just a couple of days ago. There
> > is a link included at the bottom of every message that gives
> > the address of the list archives. If you follow this link, and
> > search the archives for the word "expires", limiting the date
> > to the past week or so, you will find the answer you need.
> >
> >  It's considered to be especially respectful and polite to
> > search the archive before posting a question...
> >
> >
> > -cks
> >
> >
>___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
>body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to