Spring Framework

Spring Projects

Spring Project 1

adplus-dvertising
ParameterizableViewController
Previous Home Next

This controller provide the facility to return the name view. This view are configure in the configuration file and it is also provide the facility to alternative to sending a request to the view such as a JSP. This controller advantage is that the client not see the view technology for example JSP,Velocity etc. client see only controller URL this view determined by the ViewResolver.

Syntax:

public class ParameterizableViewController
extends AbstractController

This controller provide following type of method:

setViewName:

public void setViewName(String viewName);

getViewName:

public String getViewName();

initApplicationContext:

public void initApplicationContext();

handleRequestInternal:

protected ModelAndView handleRequestInternal
(HttpServletRequest req,HttpServletResponse res)
throws Exception

Example of ParameterizableViewController in Spring MVC

Previous Home Next