Hi all, I'm using Tomcat 3.1 with Apache 1.3.12 on FreeBSD Unix.  Have
also tried the Tomcat end on Win NT, same results...

I'm having trouble with correct setting of the HTTP status code to 304
(Not Modified) if my servlet's getLastModifed() method returns a time
which is no greater than the request's If-Modified-Since header.  From
some debug in the servlet, I can see that doGet() is called only once,
as expected, since further calls to doGet() are not required as the
getLastModified() is working.

The problem is that Apache is logging, in its access log, a code of
200 (OK) and a content length of 0.  Shouldn't the 304 code be
returned by Tomcat over the AJP protocol to Apache??  I grepped for
'getLastModified' in all the Tomcat source code and didn't come up with
much.

Could it be that Tomcat doesn't do 304's correctly??  I can't believe
this to be the case.  Is the Apache end wrong?  BTW, I'm using the
ApJServMount directive to funnel the request to Tomcat.

This came about as I'm trying to put a servlet wrapper around a JSP
page which wont change after its initial construction.  Since JSP
pages don't support the 304 style of response at all, I thought the
wrapper would save me.  I'm just a bit worried about the 200 code not
being a 304 at the Apache end...

My understanding of the getLastModified() comes from Jason Hunter's
(great!) book, page 67, so forgive me if I'm way off base in my
argument.


Any help gratefully appreciated...

stu


--
Stuart Maclean, Research Associate
University of Washington
ITS Research Program, College of Engineering
Box 352500
Seattle, WA 98195-2500
Tel: (206) 543-0637
http://www.its.washington.edu

___________________________________________________________________________
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