SCJP Certification

Sun Certified Java Programmer Certification exam essentials

April 21st, 2010

What is the getLastModified() method?

SCWCD, by Daisy Williams.

The getLastModified() method is used to return the time the HttpServletRequest object was last modified, in milliseconds since midnight January 1, 1970 GMT. This method returns a negative number if the time is unknown. This method will be overriden by those Servlets that support HTTP GET requests and can quickly determine their last modification time. This method allows the browser and proxy caches work more effectively, reducing the load on server and network resources. The following is the general form of the method:

protected long getLastModified(HttpServletRequest rq1)

Here, the parameter rq1 is the HttpServletRequest object that is sent to the servlet. This method returns a long integer specifying the time the HttpServletRequest object was last modified.

Share

Back Top

Responses to “What is the getLastModified() method?”

Comments (0) Trackbacks (0) Leave a comment Trackback url
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Your email address will not be published. Required fields are marked *

*