I want to bind parameters of a ServletRequest to arbitrary domain objects. Params are available as a map of type
Map<String, String[]> // String = key, String[] = values
They should be converted and bound to the fields of the target object. Id like to have a method like this:
// definition:
public void bind(Map<String, String[]>, T target)
// usage:
bind(request.getParameterMap(), domainObject);
What is the best way to bind request parameters to a domain object in a Java Servlet? What libs are available for this purpose or how would you write one?