To submit data to be persisted on a database server from a mobile device, the typical way is to send data via a Http post and have the data persisted by the Http request handler. One can write custom code to do this, but possibly a better way is to leverage on RESTful Web Services.
I found it to be better simply because it minimizes the coding required. Coding required on the server side – zero. Amazing but true, here’s how. Client side coding is basically to perform Http post (example here). Tip: use the “Test RESTful Web Services“ feature in Netbeans to verify that the format for the data submitted (JSON or XML) is correct.