I created a simplehashmap using the accepted solution in this question: How to create a simple map using JavaScript/JQuery
I however need to send this var to a servl
I creates a JSON string and then sent it via an ajax post to the servlet and build the HashMap there.