Hi Rob,
On Wed, 21 Jul 1999, Robert Chou wrote:
RC| 1. getHeader("If-Modified-Since") always returns null.
RC| 2. getDateHeader("If-Modified-Since") always returns -1.
[...]
RC| snoop.jsp is a sample jsp file included with gnujsp which happens to dumps headers.
RC| For some strange reason, "Host" and "If-Modified-Since2" is printed, but not
RC| "If-Modified-Since".  I then wrote a servlet to output this header with no luck.
RC| getHeader always returns null.  I then sent the above request to a static html
RC| file and got a 304, which seems to show that apache got it, at least.

The 'If-Modified-Since' header is evalutated by Apache itself and thus
your servlets do not get it. 

Basically, if Apache gets a request like this, it invokes the 
'long getLastModified()' - method of your servlet which must return the 
milliseconds since 1970 when the content (which would be generated) has 
last changed and invokes the doGet()/doPost() method only if the content
is newer. The default implementation of getLastModified() always returns a
value which requires to call do[Get/Post](). 

You find a longer descripton of this
behaviour at Jason Hunters Book pp 67,68

ciao,
  -hen
---
Henner Zeller                                 [EMAIL PROTECTED]
 PGP pub key [77F75B39]: finger [EMAIL PROTECTED] 

 If Microsoft is the answer, it must have been a VERY silly question.



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to