I need to develop an web application in spring mvc, which can respond to client in html, json and xml by taking input parameters, how can I design this using spring mvc, I know using @ResponseBody I can get xml or json response, but how to get html response, I need to give different methods for html and json or with same method it is possible?
Example:
http://blip.tv/file/6213507?skin=json – Gives json o/phttp://blip.tv/file/6213507?skin=api – Gives xml o/p
http://blip.tv/file/6213507 – Gives html o/p
I found a great example on doing this using ContentNegotiatingViewResolver