JSON, JSR-303, Spring MVC and Ext.js

So I thought I’d post this in case others hit it. If you want to Spring MVC and POST JSON from an Ext JsonWriter to the server and have it populate your bean model and also get validated by JSR-303 validator then you’ll need to do a little work because it doesn’t work out of the box.

In the end I had to do some ugly classpath overriding to get it to work in the way I expected by writing my own modified version of Spring’s HandlerMethodInvoker. If you hit similar issues I suggest following this JIRA: http://jira.springframework.org/browse/SPR-7114 and feel free to use the attached code on the JIRA. It’s been working great for me now.

About Matt

I work as a frontend js developer and backend Java developer for an Investment Bank in London. I also wrote and look after subtunes an open source frontend for Subsonic music server. In my spare time I try to DJ, practice Kung Fu and sharpen my code skills
This entry was posted in Random and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam protection by WP Captcha-Free