Cant you just open an output stream and write the file to the servlet ? Its possible to do that. After you write to the output stream, read the response from the servlet.
How do I check inside a servlet if some data is really sent e.g. in this case if a client really send a file or not.
Well you could open the input stream and read some data. If the number of bytes read is 0 then no data was sent by your client.
I want to use https protocol but don't know how to configure this. Any help is appreciated.
Which web container / web server are you using ? That tomcat link should be of help if you are using tomcat to set these things up. How about asking the client application to login before any upload requests are sent ? Or is the data sensitive enough to warrant a HTTPS transaction ?