Well thanks for all answers. I found the answer myself. It was because I only added "commons-fileupload-1.2.1.jar". One more library was needed to be added. It was "commons-io-2.3.jar". After adding this library, it started working fine for me. I dont know but atleast it should throw some error regarding this..