How to avoid resubmit in jsp when refresh?

后端 未结 7 1629
误落风尘
误落风尘 2020-12-07 23:05

I am writing a program, but i encounter a problem: when I refresh the jsp page, system will automatically resubmit the whole page, and i don\'t know how to avoid it, can so

相关标签:
7条回答
  • 2020-12-07 23:59

    Don't use GET for submitting or otherwise changing data. Use POST instead. You'll want to change your form to read

    <form action="test.jsp" method="get">
    

    See http://www.google.com/search?q=get+post for more info.

    (Your question is also a bit unclear - do you mean refreshing in browser, or in the container (eg Tomcat)? What do you mean resubmit the page? Pages don't get submitted, forms do. Which system? I guessed what you meant, if you meant something else, let us know.)

    0 讨论(0)
提交回复
热议问题