How to get the size of uploadded file before it is transferred from client to server with html:file tag of struts 1.2?

2007-12-05 Thread William King
We can use the validate method of actionform class to check whether the size of uploadded file has exceeded the max size.but,do we really have to upload that file completely before check? if i upload a very large file,maybe several g bytes,then it taks a very long time to transfer that file from cl

How to check whether the uploaded file exists when using html:file tag of struts 1.2?

2007-12-05 Thread ang jin
when i upload file with html:file tag of struts 1.2,how can i judge whether the inputted file path is a valid one? the development enviroment is tomcat+struts+eclipse. i once want to check it in the validate method of corresponding actionform.but in debug mode,after i input a invalid file path