我正在使用一个简单的html / javascript将数据发布到在SpringSource tc Server上运行的servlet,首先单击该请求作为GET而不是POST接收,但在后续点击servlet确实收到POST请求。 为什么请求在到达servlet上的服务方法之前转换为GET。可以做些什么来解决它。
I tried opening that html/javascript file in chrome/firefox/IE browsers to see if it makes any difference, but still the same issue.
function formSubmit(){
document.forms['myForm'].action="https://myURL";
document.forms['myForm'].method='post';
document.forms['myForm'].target='_blank';
document.forms['myForm'].submit();
}
this is the code that I use on the html page to post the form data to the servlet.