关于 request type = put 在tomcat上如何配置
引用
https://blog.csdn.net/kthq/article/details/5157822
function getXMLHTTPRequest(){ if (XMLHttpRequest) { return new XMLHttpRequest(); } else { try{ return new ActiveXObject('Msxml2.XMLHTTP'); }catch(e){ return new ActiveXObject('Microsoft.XMLHTTP'); } } } var req = getXMLHTTPRequest(); req.open('DELETE','http://localhost/test.jsp',false); req.send(null); document.write(req.responseText);
引用
在Tomcat的web.xml文件中配置org.apache.catalina.servlets.DefaultServlet的初始化参数
[xhtml]viewplaincopy
<init-param>
<param-name>readonly</param-name>
<param-value>false</param-value>
</init-param>
readonly参数默认是true,即不允许delete和put操作,所以默认的通过XMLHttpRequest对象的put或者delete方法访问就会报告http403forbidden错误。
相关推荐
jiaguoquan00 2020-07-07
zhaolisha 2020-06-12
坚持着执着 2020-06-05
knightwatch 2020-04-25
zhaolisha 2020-01-11
zhaolisha 2019-12-29
wanghongsha 2019-12-06
小小大人物 2014-01-19
loopstang 2014-01-11
roodyszz0 2019-11-17
81493369 2019-11-04
Liuzhiqianblog 2019-11-03
用不完的好奇心 2019-10-26
89241846 2019-09-12
青菜萝卜白菜 2019-07-03
荒唌Blog 2017-12-18
无材可去补苍天 2019-06-12
HAcSeeking 2018-11-05