F
Furtano
Gast
Ich möchte auf dropdownFilmeFilter zugreifen.
Aber ich bekomme den Fehler:
description The specified HTTP method is not allowed for the requested resource (Request method 'GET' not supported).
Aber ich bekomme den Fehler:
description The specified HTTP method is not allowed for the requested resource (Request method 'GET' not supported).
PHP:
@RequestMapping(value = "/articles", method = RequestMethod.POST)
public String showArticles(@RequestParam ("dropdownFilmeFilter") String filter, Model model) {
if (filter.equals("aufsteigend"))
System.out.println("it runs");
List<Article> article = (List<Article>) gd.findAll(Article.class);
model.addAttribute("articles", article);
return "articles";
}
<div class="filmFilter">
Filme: <c:out value="${ articles.size() }"></c:out>
Sortieren
<form name="filter" action="articles" method="post">
<select name="dropdownFilmeFilter">
<option value="aufsteigend">Preis: aufsteigend</option>
<option value="absteigend">Preis: absteigend</option>
<option value="bewertung">Kundenbewertung</option>
<option value="erscheinung">Erscheinungsdatum</option>
</select>
<input type="submit" name="mysubmit" value="OK" />
</form>
</div>