What is the use of @RequestMapping ("VIEW") annotation in Spring Portlet MVC

In my Spring portlet controller class, I have this at the class level:

@Controller @RequestMapping("VIEW") public class myContoller extends AbstractController 

Now @RequestMapping should display the request URL to the action handler (controller). But why say @RequestMapping("VIEW").

In portlet.xml , I have a <portlet-mode>VIEW</portlet-mode> defined for this particular portlet controller.

+4
source share
1 answer

Portlets can support different modes ( VIEW , EDIT and HELP by default, if I remember correctly).

<portlet-mode>VIEW</portlet-mode> in portlet.xml says that the portlet supports VIEW mode.

 @Controller @RequestMapping("VIEW") public class myContoller extends AbstractController 

simply limits the requests processed by @RequestMapping annotated methods of this controller to those sent in VIEW mode.

+3
source

All Articles