doHead() method is used to check whether file is modified or not?
what it means...which will check which one? is it one servlet to check whether another servlet modified or not? By checking what it will do? modified or not is compared to the last accessed time stamp. is this method used for development purpose only?
if another servlet is modified from last access then what the current servlet does? will it reload that?
Can somebody clarify this.
posted 12 years ago
The HEAD action returns only the headers for a resource and not the resource itself, be it a HTML page,a servlet or any servable content for that matter.
One typical usage of HEAD action is to retrieve the header of a file and read the last modified time stamp. Based on this, the client software can decide whether to re-download the new copy or continue with the cached version of the resource.
The doHead() method can be used to capture such HEAD requests so that you can read/alter the headers that are being sent to the client.