I am using a simple html/javascript to post data to a servlet running on SpringSource tc Server, on first click the request is received as a GET rather than a POST, but on subsequent clicks servlet does receive a POST request. why is the request getting converted to a GET before reaching the service method on the servlet. what can be done it resolve it.
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.