Configure error page for @PathVariable type mismatch
问题 Suppose I have a controller: @Controller public class SomeController { @RequestMapping(value = "{id}/object.do") public String showObject(@PathVariable("id") Integer id, HttpServletRequest request) { //do smth return "somePage"; } } When "id" is not a Number, but string like "aaa/object.do" Tomcat show me an error - "The request sent by the client was syntactically incorrect." Is there a way to configure an error page that will be shown only when "id" path variable has incorrect type? 回答1: