Sending response from Jersey web service (HTTP-POST) to the client (Jquery AJAX)
posted 3 years ago
This is a Jersey web service to post data to a server and store it to the database:
Following is an AJAX client that performs the POST call:
Issue: Web service has to return the response to the ajax-client and the ajax-client has to display the response in an alert. Response if an exception is encountered(data already exists in the DB) is different from Response when there is no exception.
Question: What are the changes to be made on the server and client side codes so that sending and receiving of responses is possible?