ここに問題があり、あなたの助けが必要です。
コントローラからjspに整数値を取得しようとしています。
私のjspには、ajax呼び出しがあります。
$("#hdnCustomerSize").load(contextPath+"/customer/size", function() {
// some codes
});
私のコントローラーでは:
@RequestMapping(method = RequestMethod.GET, value="/size")
public void getCustomerSize(Model model) {
model.addAttribute("customerSize", customerService.getCustomers().size());
}
私の問題は、Imが例外を取得することです。
javax.servlet.ServletException: Could not resolve view with name 'customer/size' in servlet with name 'tombuyandsell'.
私は意図的にこれをにマップしなかったので、私はこの例外を取得していることを知っていますviews.properties
。size
その理由は、jspページ全体ではなく、整数値のみを取得したいからです。助けてください。