Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Sending response from Jersey web service (HTTP-POST) to the client (Jquery AJAX)  RSS feed

Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

Any help is highly appreciated. Thanks.
Live a little! The night is young! And we have umbrellas in our drinks! This umbrella has a tiny ad:
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!