I am attempting to send data encoded in JSON from a Java SE application to a Java EE web application through an HTTP Post request using Apache HttpClient. The framework being used for the Java EE web application is JavaFaces and the server is GlassFish. The web application will receive the http post request, parse the json, and send that data to a JavaDB (Derby) database. My understanding is that a servlet on the Java EE end can be created that receives the http post request when it is sent, parses the JSON, and sends that data to the table in the database.
Can anyone please show me what such a servlet would look like or refer me to an example of a servlet that does what I am trying to do?