title: What is the purpose of spring model addObject(Object attributeName)?
body: <p>In spring mvc, when creating a ModelAndView there's a method called <code>addObject(Object attributeName)</code> single parameter, and I don't understand how to make use of it. I also see <code>model.addAllObjects(Map&lt;String, ?&gt; object)</code>. </p>
  
  <p>How can I get that map in jsp? Or what is the purpose of those methods? I only know how to make use of <code>model.addObject("car", new Car())</code> because is like defining servlet parameters. I found this information in spring but I don't really understand it.</p>
  
  <p><a href="http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/servlet/ModelAndView.html#addObject-java.lang.Object-" rel="nofollow">Spring addObject and addAllObjects</a></p>