Rectangle 27 0

How to get form data in Java Spark using Thymeleaf template engine?


<form action="/locationAccepted" method="GET">
    <input type="text" name="userLocation"/>
    <div class="button">
        <button type="submit">Send your message</button>
    </div>
</form>
request.queryParams("userLocation")

You have two bugs in your code, both in the HTML form:

Note