Q:

Posting a collection/array of data/objects in a regular HTTP POST

I have a @OneToMany JPA association with an instance of Curriculum having several instances of WorkExperience. 
The issue I have is that I want to be able to persist one Curriculum together with several WorkExperiences in a single entity manager persist/save call.
I am not sure how to glue several instances of WorkExperiences coming from a regular HTTP POST of a  html form to a java collection/set in the Spring MVC model attribute...
First of all, is this possible at all? If so is it a good idea and what kind of html can post collections/arrays of data in a regular HTTP POST?
The  Curriculum JPA entity:
@Entity
public class Curriculum {
    ...
    @OneToMany
    private Set<WorkExperience> workExperiences;
    ...

The WorkExperience JPA entity:
@Entity
public class WorkExperience {
...

A:

Yes, it is possible.  Spring MVC supports sending Lists/Maps as form values.  The way that works is by subscripting the value.  For a List, you use the list number, like
<form:input path="myVal[1].property" />

And for a Map you use the map key like
<form:input path="myVal[key].property' />

This is assumming your Model Attribute has a List/Map of said item.  I would recommend using a DTO and translating to your Entity.  It may be overkill, but I have a problem with allowing the View to manipulate my Entity objects directly.
Also to note: You will have to do some View-side coding to dynamically add/remove items on the form.  This can be a real pain, as deletes don't work like you would imagine.  Spring MVC has the ability to add to a List/Map, alter the items in a List/Map, but I haven't found a way to remove items from a map directly.  I usually handle removes by adding a "remove" boolean flag into my DTOs, then tracking removals by simply adding a form:hidden element for that item in the List/Map, and clean the List/Map on the server-side when I get it.
Once you get all your Entities on the Server-side, then you have to store them.  If you want this to be more auto-magic, simply set an annotaion on your parent Entity like
@OneToMany(cascade=CascadeType.PERSIST)

There are several CascadeTypes available, so pick the one that makes sense.

