我在 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).
你能指出我哪里出错了吗?提前致谢!