Why would you want to do a file upload in Struts 2 and not use the Struts 2 file upload mechanism?
Oh, I think I misunderstood what you were asking; missed the part about validation.
If the commons-upload/regular file upload validation doesn't work for you why not just validate in a validate() method? The "validation" interceptor is in the stack after file upload, so you can do whatever you need to.
Joined: Apr 02, 2009
Could you please throw some highlight about validate() method? Do i need to implement any interfaces ?
Right now what i'm doing is, on uploading i'm calling some action mthod. Within that method, using the value of
getUploadContentType() i'm deciding whether to throw back the error or not. Still not sure about restricting minimum and maximum size allowed.