提交表单时,即使表单方法是Post,我也有2个请求,一个是post,另一个是get

时间:2019-05-31 19:21:28

标签: html forms jsp post get

提交表单时,即使表单方法是Post,我也有2个请求,一个是post,另一个是get(发布请求后不应存在并获取请求)

我希望删除使用post方法提交表单时不应出现的get请求。

第一个提交按钮效果很好,但是第二个和第三个已批准但不批准的按钮不起作用。

<form:form method="POST" modelAttribute="sponsorProgramObj" id= "sponsor_programe_form" autocomplete="off"> 
<div class="d-flex justify-content-around"> 
                                <c:if test="${userProfile.hasViewAccess('ssa_submit')}" >   
                                    <div>
                                        <button type="submit" id="submit_button" class="btn btn-md btn-primary" formaction="submitSponsorDetails?${_csrf.parameterName}=${_csrf.token}">
                                            Submit                                    
                                        </button>
                                    </div>
                                    <div align="right">
                                        <label>
                                            <a href="applicationSummary">
                                                <i class="fa fa-arrow-left faa-passing-reverse animated-hover fa-sm"></i>&nbsp;
                                                Back To Summary Screen
                                            </a>
                                        </label>
                                    </div>
                                </c:if>

                                <c:if test="${userProfile.hasViewAccess('ssa_approve')}" >    
                                    <form:hidden path="operation" name="operation" id ="operation" />
                                    <div>
                                        <button type="submit" id="btn_approve" formnovalidate="true" class="btn btn-md btn-success" onclick="changeAction('APPROVED')" formaction="processSponsorDetails?${_csrf.parameterName}=${_csrf.token}"> 
                                            Approve
                                        </button>
                                    </div>
                                    <div>
                                        <button type="submit" id="btn_not_approve"  formnovalidate="true" class="btn btn-md btn-danger" onclick="changeAction('NOTAPPROVED')" formaction="processSponsorDetails?${_csrf.parameterName}=${_csrf.token}">
                                            Not Approve
                                        </button>
                                    </div>
                                </c:if>

                            </div>
</form:form>
``



I expect one post request.

0 个答案:

没有答案