Anant Jagania wrote:Hi Mark,
Thanks for the reply.
So I can have both types of requests go through the controller. Thats really great.
I couldn't understand about the changing the request to .json for sending it to RESTFul method of controller. I understand that you have the JSON representation.
I will have to use the object marshalling due to security reason.
Thanks
Anant
There is a new "view resolver" This is for the new RESTful Web Services, and it can also contain a list of other view resolvers. So you can map by request type, and also extension. So if the URL is say www.mywebsite.com/MyApp/Account/list in the browser, then the returned view
string will be used to resolve to say a
jsp page. But if the url in the browser is www/mywebsite/MyApp/Account/list.json it will call the exact same Controller method, however the Model that is returned will be sent back as JSON representation instead of going to a jsp page.
When you read about Spring RESTful, you will see what I mean.
Hope that helps
Mark