MVC Action Command
We can create liferay mvc portlet in two ways . 1) Writing all lifecycle methods( render , action , resouce ) in single portlet class If you have a small application that won’t be heavy on controller logic , you can put all your controller code in the -Portlet class 2) Will divide the controller into MVC Action Command classes, MVC Render Command classes, and MVC Resource Command classes. We are familiar with the first Approach . Lets explore on the second approach . We have two scenarios 1) Creating new Action Command for our custom portlet . --> Create new module project with mvc-portlet template and project name "sample-portlet" --> create a action url in jsp <portlet:actionURL name="/samplePortlet/addEntity" var="addEntityURL" > <portlet:param name="Entity" value="1234" /> </portlet:actionURL> --> Create SampleActionCommand class which extends BaseMVCActionCommand Below impo