The file will only be overwritten if you save it under the same name. You should check if the file exists before saving the newly uploaded file,a dn take appropriate action if that's the case. Which file upload library are you using?
I'm not familiar with the API you're using, but isn't "request.getFilesystemName(e.nextElement().toString())" a file name? I'm assuming that you know in which directory files should be stored, so you should be able to check whether a file of this name already exists in that directory, no?