0

我想访问下拉电影过滤器。

我收到错误:描述指定的 HTTP 方法不允许用于请求的资源(不支持请求方法“GET”)。

@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>
4

0 回答 0