File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: confused in using getLastmodified() of HttpServlet
 
Similar Threads
get created time of a file using Java
is there any getLastModified example?
getLastModified(..)
getLastModified() not working in JSP
Conditional GET operation