I don't think it is straightforward in Netbeans to connect to a remote glassfish server. You could try something like FUSE (MacFuse) to mount the remote directory and add the server in Netbeans as you would normally add a local server but pointing to the remote dir. I haven't tried it though...
[Message sent by forum member 'sashko5' (dft_at_abv.bg)]
http://forums.java.net/jive/thread.jspa?messageID=390125