June 2014
Beginner to intermediate
304 pages
7h 25m
English
Content negotiation is a mechanism that makes it possible to serve a different representation of the same resource. For example, so far we have displayed our product detail page in a JSP representation. What if we want to represent the same content in an XML format, and similarly, what if we want the same content in a JSON format? There comes Spring MVC's ContentNegotiatingViewResolver (org.springframework.web.servlet.view.ContentNegotiatingViewResolver) to help us. The XML and JSON formats are popular data interchange formats that are used in web service communications heavily. So, using ContentNegotiatingViewResolver, we can incorporate many views such as MappingJacksonJsonView (for JSON) and MarshallingView ...
Read now
Unlock full access