commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Required: Information on the Last Modification Time Stamp at the Client Side machine
Date Fri, 15 Dec 2006 13:02:30 GMT


I used commons FileUpload [version FileUpload 1.1.1] for file upload
feature in servlet.Using API i am able to get all the required information
except the last modified time stamp of the file in the client side machine.

Code Snippet that i am using::
                        // Create a factory for disk-based file items
                        DiskFileItemFactory factory = new
                                    yourMaxMemorySize, yourTempDirectory);

                        // Create a new file upload handler
                        ServletFileUpload upload = new

                        // Parse the request
                        List /* FileItem */items =

                        // Process the uploaded items
                        Iterator iter = items.iterator();
                        while (iter.hasNext()) {
                              FileItem item = (FileItem);

                              if (!item.isFormField()) {
                                    clientFileName = item.getName();
                                    sizeInBytes = item.getSize();

Example,to expain my requirement:

      Consider a file SampleFile001.txt, Last Modified on the Client
Machine at :-- Tuesday, November 21,            2006, 3:12:11 PM

      Say the file was uploaded/written on to the Server file system using
the Commons API call on                   Wednesday,November 22, 2006,
3:12:11 PM.

      Then at the server side i can only retrieve the Creation TimeStamp of
the file on the server file         system(Wednesday,November 22,
2006,3:12:11 PM), where as i need the Time Stamp when the file was
last modified on the client machine(i.e,Tuesday, November 21,2006, 3:12:11

Plz suggest me solution


This e-Mail may contain proprietary and confidential information and is sent for the intended
recipient(s) only.  If by an addressing or transmission error this mail has been misdirected
to you, you are requested to delete this mail immediately. You are also hereby notified that
any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution
and/or publication of this e-mail message, contents or its attachment other than by its intended
recipient/s is strictly prohibited.

Visit us at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message