重复刷新页面重复提交

来源:互联网 发布:域名在哪买 编辑:程序博客网 时间:2024/04/29 16:01

In add action          :

      if (isTokenValid(request, true)) {//if not duplicate submitting, insert data

                      if (flag.equals("1")) stationeryApplyMgr.addStationeryApplyData(request, stationeryapply, stationeryApplyDetailList);

                     /* forward to the apply for stationery page(/employeeservice/stationeryapply/stationeryapply.jsp) */

                      return mapping.findForward("PAGE_KISS_EMPSRV_STATIONERY_APPLY_SUCCESS");

                 } else {//if duplicate submitting, save new token instead of old one

                      saveToken(request);

                      return mapping.findForward("PAGE_KISS_EMPSRV_STATIONERY_APPLY_SUCCESS");

                      }