kartik hedau wrote:Hi all
i am newbie in spring MVC.
i want to know which is better way,either to return ModelAndView or just return String with controller?? I have implemented simple login demo with both way and both are working well.
Well, in my opinion, it depends on a particular context. Sometimes I find returning a String is useful, sometimes returning a ModelAndView object is preferred. It's flexible, depending one's need and habit.