Here\'s the scenario: I have a multi threaded java web application which is running inside a servlet container. The application is deployed multiple times inside the servlet
The most simple solution is to create another process (web service or whatever is most simple to you). Only this process reads/writes the file and it listens to read/write requests by the other services.
While it might seem that this is slower than using the network share directly, that's not necessarily the case: Using a network share means to use a client/server which is built into your OS (which does exactly that: send read/write requests to the server which offers the share).
Since your service is optimized for the task (instead of being a general "serve file" service), it might even be faster.