The addHeader() method was added to HttpServletResponse in Servlets 2.2.
Does the version of JDeveloper you are using support Servlets 2.2, or does
it only support some earlier version?

The setHeader() method was available prior to Servlets 2.2, though.

--
Martin Cooper


----- Original Message -----
From: "Willy LEGIMAN" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 5:30 PM
Subject: Re: Caching a JSP Page - Error!


> Tried your code and received the following error in JDeveloper:
>
> <%@ page contentType="text/html;charset=WINDOWS-1252"%>
> <%@ page import="java.io.*,java.util.*" %>
> <%
>   response.addHeader("Pragma", "No-cache");
>   response.addHeader("Cache-control", "no-cache");
>   response.addDateHeader("Expires", 1);
> %>
>
> Error: (4) method addHeader(java.lang.String, java.lang.String) not found
in
> interface javax.servlet.http.HttpServletResponse.
> Error: (6) method addDateHeader(java.lang.String, int) not found in
> interface javax.servlet.http.HttpServletResponse.
>
>
> -----Original Message-----
> From: Hoorn, Michiel van [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 21 March 2001 20:20
> To: [EMAIL PROTECTED]
> Subject: Re: Caching a JSP Page
>
>
> Or this in yuor jsp:
>
> <%
>   response.addHeader("Pragma", "No-cache");
>   response.addHeader("Cache-control", "no-cache");
>   response.addDateHeader("Expires", 1);
> %>
>
> > ----------
> > From:         ???[SMTP:[EMAIL PROTECTED]]
> > Reply To:     A mailing list about Java Server Pages specification and
> > reference
> > Sent:         Wednesday, March 21, 2001 8:14 AM
> > To:   [EMAIL PROTECTED]
> > Subject:      Re: Caching a JSP Page
> >
> > All you have to do is to add these below
> > <meta http-equiv="pragma" content="no-cache">
> > <meta http-equiv="cache-control" content="no-cache">
> >
> > -----Original Message-----
> > From: A mailing list about Java Server Pages specification and reference
> > [mailto:[EMAIL PROTECTED]]On Behalf Of OK Prakasan
> > Sent: Wednesday, March 21, 2001 3:28 PM
> > To: [EMAIL PROTECTED]
> > Subject: Caching a JSP Page
> >
> >
> > Hi All,
> >      I would like to prevent  the browser from caching a JSP page.
> > Please give me a solution to achieve this.
> > Thanks in Advance
> > Prakasan
> >
> >
==========================================================================
> > =
> > 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
> >
> >
==========================================================================
> > =
> > 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
> >
>
>
===========================================================================
> 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
>
>
===========================================================================
> 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

===========================================================================
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

Reply via email to