This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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 Building Microservices this week in the Design 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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: confused in using getLastmodified() of HttpServlet
 
It's not a secret anymore!