0

我在 jsp 文件中有一个发布请求:

<form method="post" action="http://localhost:8081/MerchantMovieTheater/api/movieTheater">
    <input type="hidden" name="balance" id="balance" value="${balance}"/>
    <input type="submit" value="Merchant Site">
</form> 

对应的控制器是:

@RequestMapping(value = "movieTheater", method = RequestMethod.POST)
    public String submitTransaction(Model model, @RequestParam("balance") Double balance){
}

但是当我执行jsp时,我收到以下错误:

HTTP Status 400:  The request sent by the client was syntactically incorrect (Required Double parameter 'balance' is not present).

你能指出我哪里出错了吗?提前致谢!

4

1 回答 1

0

我解决了!我错过了一个'?在网址的末尾。行动应该是:

action="http://localhost:8081/MerchantMovieTheater/api/movieTheater?">

现在一切正常!

于 2013-08-30T11:28:33.573 回答