mercredi 29 juillet 2015

Didn't getting any requests from jQuery ajax to JAVA RESTful webservice

Please help me to solve this serious issue...

My web application is developed using 'html, javascript and css' for front-end & back-end with RESTful webservice in JAVA.

Front-end is deployed in Apache2 server & back-end in JBOSS 7 server. Currently the communication between front-end & back-end is not possible via jQuery ajax. There is not showing any error messages too..! But didn't getting any request calls to the JBOSS server from the Apache server. I used 'application/json' as contentType. Here adding the code which I used...

$.ajax({

url : URL,
type : 'POST',
headers : {
            "ACCEPT" : "application/json"
      },
contentType : "application/json; charset=utf-8",
crossDomain : true,
data : request,
dataType : 'json',

success : function(response){

          //my code
   },                                   
  error : function(xhr, status, error) {
          //my code
   }
 });

Hope you peoples will help me.

Thanks in advance..

Aucun commentaire:

Enregistrer un commentaire