I have an 'advanced search' page (A) that needs to submit (using GET method) to a Controller. In the end, that controller should forward to an 'advanced search result' page (B). But the problem is that there are lots of request parameters to declare in the controller's handler method... It'd be nice if there is some way to bind all the parameters of request to an custom object (like @ModelAttribute) by using @RequestParam. Is that possible?
Ugly code:
Code:@RequestMapping(method = RequestMethod.GET) public String search(@RequestParam("a") String a, @RequestParam("b") int b, @RequestParam("c") long c, @RequestParam("d") String d, @RequestParam("e") String e, @RequestParam("f") String f, @RequestParam("g") String g, @RequestParam("h") String h) { ... }


Reply With Quote