java - Spring 3 web request interceptor - how do I get BindingResult? -


i realy appreciate spring 3 anoation driven mapping of web controllers

i have lot of controllers signatures like:

@requestmapping(value = "solicitation/create",method = requestmethod.post) public string handlesubmitform(model model, @modelattribute("solicitation") solicitation  solicitation, bindingresult result)  

but issue is, want write interceptor ho through bindingresults after processing - how them httprequest or httpresponse?

as intercpetor methods alike signature

public boolean posthandle(httpservletrequest request, httpservletresponse response, object handler) 

after execution of controller method bindingresult stored model attribute named bindingresult.model_key_prefix + <name of model attribute>, later model attributes merged request attributes. so, before merging can use hurda's own answer, after merging use:

request.getattribute(bindingresult.model_key_prefix + "solicitation") 

Comments

Popular posts from this blog

drupal - using views argument in the view tpl.php file -

php - Posting PHPBB Forum Thread/Post info in a website -

php - Add a blog by sending a mail to a certain emailadress -