Model.SetViewName in Spring -


i know addobject here. can please tell me modelandview.setviewname("vendorinfo");

sorry beginner

@requestmapping(value = "/listsupplier",method = requestmethod.get) public modelandview supplierlist() {     list<supplier> supplierlist=adminservice.listsuppliers();     modelandview.setviewname("vendorinfo");     modelandview.addobject("supplierslist", supplierlist);     return modelandview; } 

it sets name of view resolved configured viewresolver. let's view in /web-inf/views/vendorinfo.jsp , view resolver configured prefix /web-inf/views/ , suffix .jsp, view resolver know use prefix + viewname + suffix view rendered.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -