Sending <option> value from JSP form to Controller Spring MVC
<p>Here is my form in JSP file:</p>

<pre><code>    &lt;p class="lead"&gt;Check out the books in my store...&lt;/p&gt;

    &lt;form:form action="${pageContext.request.contextPath}/bookListByCategory"&gt; 
    &lt;select path="category"&gt;
        &lt;option value="Programming"&gt;Programming&lt;/option&gt;
        &lt;option value="Fiction"&gt;Fiction&lt;/option&gt;
        &lt;option value="Biography"&gt;Biography&lt;/option&gt;
        &lt;option value="Travel"&gt;Travel&lt;/option&gt;
    &lt;/select&gt;
    &lt;input type="submit" name="submit" value="submit" /&gt;
    &lt;/form:form&gt;
</code></pre>

<p>The form is sent to the method:</p>

<pre><code>@RequestMapping(value = "/bookListByCategory/{category}")
public String getBooksByCategory(@PathVariable String category, Model model) {
    List&lt;Book&gt; bookListByCategory = bookService.getBookListByCategory(category);
    model.addAttribute("books", bookListByCategory);
    model.addAttribute("category", category);
    return "bookList";
}
</code></pre>

<p>For some reason it doesn't work and I can see in browser the following:</p>

<p><img src="https://i.stack.imgur.com/x6pfU.png" alt="enter image description here"></p>

<p>When I click on "submit" it will display 404:</p>

<p><img src="https://i.stack.imgur.com/0cQ20.png" alt="enter image description here"></p>

<p>I can see that the value of selected option is not sent to the Controller, which is required to process the request. Any thoughts?</p>