前台发送post请求
$.ajax({
url:'xxx',
type:'post'
});
报错HTTP method POST is not supported by this URL
原因是Servlet中没有继承doPost方法,
post方式的提交请求需要有doPost方法来处理,同样get方式的请求需要doGet方法来处理,否则的话也会报错HTTP method GET is not supported by this URL。
前台发送post请求
$.ajax({
url:'xxx',
type:'post'
});
报错HTTP method POST is not supported by this URL
原因是Servlet中没有继承doPost方法,
post方式的提交请求需要有doPost方法来处理,同样get方式的请求需要doGet方法来处理,否则的话也会报错HTTP method GET is not supported by this URL。