The web app is going to be very limited on where it can write that file. It would be best to have the desktop app fetch the data from the web app with URLConnection.
@Tim Parnell Thank you, Tim. I have desktop apps (Mac, Windows, and Linux versions) that share a file via Dropbox. To port it to Raspberry Pi, I will try to use Syncthing instead of Dropbox. I thought I could make it truly OS-agnostic if it were web-based.
@Stephane Mons Hi, Stephane. I meant web applications. I have already tested the concept for the Desktop apps, and it worked.