Get ahead
VMware offers training and certification to turbo-charge your progress.
Learn moreWelcome back to another installment of This Week in Spring.
We've got a lot to cover, though, so let's get to it!
@Controller class handler methods, make sure that the BindingResult argument is immediately after the model or command argument, like this:
<CODE>@RequestMapping(...) public String handleRequest( @ModelAttribute @Valid YourCustomPojo attempt, BindingResult result)</code>.
In this example, <CODE>handleRequest</Code> will validate the POJO (<CODE>YourCustomPojo</code>) - checking the POJO for JSR303-annotations and attempting to apply the constraints because the POJO is annotated with <CODE>@Valid</CODE> - and stash any errors in the <CODE>BindingResult</code>, which it makes available if we ask for it.
@SpelAssert, that works like JSR303's @ScriptAssert. </LI>
<LI> The <EM>Java J2EE SOA Key Points</EM> blog has a nice post on
<A href="http://stlarch.blogspot.com/2013/03/spring-ws-jaxb-web-sevice-client.html">using the Spring WS JAXB web service client</a>. There's very little narrative, but lots of code.
</LI>