I have used stipes on a project in the past, and it has a great TypeConverter library that can take request parameters and route them into JavaBeans. It can even handle maps and arrays, such that:
class A {
private int num;
private Map<String, Integer> map;
private List<String> list;
... setters and getters ...
}
<input type='text' name='num'/>
<input type='text' name='map["a"]'/>
<input type='text' name='map["b"]'/>
<input type='text' name='list[0]'/>
<input type='text' name='list[1]'/>
I have considered just pulling that bit of code out of stripes, but it seems like this library must exist, I just don't know what it is called.
Reference info: I have access to Java6 JDK, spring, and this happens to be for a Jersey web service MessageBodyReader implementation, basically I'd like to write a generic BeanHandlerMessageBodyReader