wood burning stoves 2.0*
The moose likes Servlets and the fly likes last modified date of a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "last modified date of a file" Watch "last modified date of a file" New topic
Author

last modified date of a file

Prabu Bala
Greenhorn

Joined: Feb 27, 2007
Posts: 23
Hi All,
I need a help from you all. I need to upload a file from client machine to server. I did it using MultipartHttpServletRequest API. Now i want to get the last modified date of a file.I used file.lastModified method to get the date but it returns the date when we upload the file to server, it not returns the original last modified date.Please let me know how to get the value.

Thanks in advance.
Prabu
Sid Murrey
Ranch Hand

Joined: Jul 07, 2008
Posts: 58
Impossible. You would have to do this client-side, passing the last modified date to the server additionally.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: last modified date of a file
 
Similar Threads
last modified date of a file.
Last modified date
Struts 2 | Last modified date of an uploaded file
what does getLastmodified() of urlconnection class retuen?
Get content of URL and preserve it's modified date