wood burning stoves*
The moose likes Servlets and the fly likes confused in using getLastmodified() of HttpServlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "confused in using getLastmodified() of HttpServlet " Watch "confused in using getLastmodified() of HttpServlet " New topic
Author

confused in using getLastmodified() of HttpServlet

PavanPL KalyanK
Ranch Hand

Joined: Feb 28, 2009
Posts: 212


I heard that getLastmodified() of HttpServlet will improve performance as it caches the data .

I am confused in using this implementation .

On to my servlet i override the getLasModified and i am returning the File's lastmodifed date .

for using this facility do i need to explicitly set the requestheader for getLastmodified() ??

Please help

Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Use it in the HEAD request.

Carefully read this article for explanation (not only the code, but also the text): http://balusc.blogspot.com/2009/02/fileservlet-supporting-resume-and.html
PavanPL KalyanK
Ranch Hand

Joined: Feb 28, 2009
Posts: 212
Good Article useful information . Thanks Bauke.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: confused in using getLastmodified() of HttpServlet