Here’s how to configure Netbeans to automagically upload files to a server using SFTP.
Before you can begin, you have to have a Netbeans project. No, wait, you actually need to have Netbeans installed. So if you don’t have Netbeans installed, or you don’t know what Netbeans is, you should go get it. If you’re an emacs user, this tutorial will be totally meaningless.
Select a project properties and select “Run Configuration” under Categories.
In the “Run As,” select “Remote Web Site (FTP, SFTP).”
Once you’ve got the connection configured, you can set the “Upload Directory.” That’s the directory on the server where your files will land.
You can choose to upload your files manually, on save or on run. I’m usually doing this sort of thing because I can’t execute the code on my local machine, so I upload on save.