SPRING CONCEPTS
HTML form
Spring Concepts / HTML form
An HTML form gathers named values for a browser HTTP request.
Understand the idea
action selects the destination and method selects GET or POST. An input’s name is its submitted parameter key. Unchecked checkboxes submit no value. Browser validation improves usability, while the server must still validate.
A concrete example
<form action="hello" method="get">
<input name="name">
<button>Send</button>
</form>In the application
The welcome page submits a greeting name; JSP forms submit task mutations with CSRF fields.
Do not use GET links for destructive actions. Form submission and AJAX/JSON submission have different default body formats.