Hello:

I recently installed ApacheTomcat 4.1.12-LE-jdk14. The installation appears
to function correctly, but I am experiencing difficulties  getting browsers
(IE 5.5 and Netscape 7.0) to recognize the "cache-control " directives
specific to the http/1.1 protocol. I am utilizing a Servlet to send back a
Response  as follows:

    if(fileName == null) {

        PrintWriter out = new PrintWriter (response.getOutputStream());
         response.reset();
         response.setHeader("Pragma","no-cache");
         response.setHeader("Cache-Control","no-cache");
         response.setHeader("Cache-Control","no-store");
         response.setHeader("Cache-Control","must-revalidate");
         response.setDateHeader("Expires",-1);
         response.setContentType("text/html");
        out.println("file not specified!");
        out.close();
        return;
    }

The Servlet Response displays fine in the Browser, but the document
containing the response is cached. This leads me to
suspect that I might not actually have an http/1.1 connection between the
Browser (IE 5.5) and the Server. The Tomcat documentation
states:

   "This Connector supports all of the required features of the HTTP/1.1
protocol, as described in RFC 2616, including persistent connections and
chunked encoding. If the client (typically a browser) supports only
HTTP/1.0, the Connector will gracefully fall back to supporting this
protocol as well. No special configuration is required to enable this
support."

While I did confirm that the IE 5.5 Browser is configured to utilize
http/1.1 (via the "Advanced" features panel of the Internet Options menu
selection), the possibility exists that the presence of a Proxy Server
between the Browser and the Tomcat Server is inhibiting the establishment of
a connection utilizing the http/1.1 protocol.

 Is it possible to detect within the Servlet code whether the connection
that was established is utilizing http/1.0 or http/1.1?
If it were, it would then be possible to indicate to the user that his
session is being terminated because it was not possible to create a
connection utilizing http/1.1.  For security reasons, I want to be able to
instruct the user's Browser, and any intermediate Proxy Servers,
NOT to cache documents being sent back to the user during his session. via
the http/1.1 "Cache-Control" Header functionality.

 Also, is it possible  to configure Tomcat to not drop back to using
http/1.0, when a connection utilizing http/1.1 cannot be established?

  Thanks

   Bill Angel
   Computer Scientist
   Silver Spring, Maryland
   [EMAIL PROTECTED]



Reply via email to