這裏我的代碼在煎茶接收JSON數據,問題是當我打電話時總是顯示,因爲syntax.I的錯誤消息,不知道從哪裏失敗了怎麼把即時通訊新來煎茶,在這裏我的代碼Ajax請求語法問題
Ext.Ajax.request({
url: 'http://117.218.59.157:8080/WishList/Login',
method: 'POST',
headers: { 'Content-Type': 'application/json;' },
jsonData:{
username : "[email protected]",
emailId : "faz"
},
success: function (response)
{
alert(response.responseText);
},
failure: function (response)
{
alert(response.responseText);
}
});
當上述方法調用它表示以下響應
<html><head><title>Apache Tomcat/7.0.14 - Error report</title><style><!--H1 {font-
family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-
size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-
color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-
serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-
serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-
serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color :
black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - </h1><HR
size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The requested resource() is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.14</h3></body></html>
我所說的JSON網址提琴手如下面的格式
Method: POST
URL: http://117.218.59.157:8080/WishList/Login
Request:
{
"emailID": "[email protected]",
"password": "ganesh"
}
Response:
[
{
"response": "Success"
}
]
我不知道我的代碼在哪裏失敗。請幫我把它整理出來
如果服務器返回一個404,它無關煎茶的東西。 –