シンプルな html/javascript を使用して、SpringSource tc サーバーで実行されているサーブレットにデータを投稿しています。最初のクリックでリクエストは POST ではなく GET として受信されますが、その後のクリックでサーブレットは POST リクエストを受信します。サーブレットのサービス メソッドに到達する前に、リクエストが 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.