The html form submission is handed over to the background servlet for processing. Why is the form sometimes submitted twice and sometimes only once?
html code:
servlet code:
Submit will be submitted once with one click, and will not be submitted multiple times
It will be submitted once with one click
You can use script control to prevent repeated submissions
The simplest is the button It changes to unavailable status immediately after submission.
The other one is to generate a token in the frontend and compare it during form verification.
can prevent duplicate submissions