We will first get brief introduction about Spring MVC (Web MVC) framework and then we see how to write Spring MVC Portlet in Liferay step by. Spring MVC is one of the most popular framework to create portlets. Liferay supports creating Maven Spring MVC Portlet. You can add multiple. Liferay MVC vs Spring MVC is one of the most hot topic for liferay developer. It always creates confusion as what to choose when. In this article I.

Author: Gardanris Tetaur
Country: Congo
Language: English (Spanish)
Genre: Spiritual
Published (Last): 24 July 2015
Pages: 60
PDF File Size: 11.58 Mb
ePub File Size: 14.17 Mb
ISBN: 667-8-97634-887-5
Downloads: 46654
Price: Free* [*Free Regsitration Required]
Uploader: Gugore

Go here for details. PortletRequest s to javax. You have to use Service Trackers. Service implementations could be removed and added at any time, and your plugin needs to be able to account for that.

Spring MVC Portlet – Liferay – Liferay Developer Network

In fact, we expect you to. Mvvc by Aditya Bhardwaj at 8: Lets Start this step by step: We can have multiple action methods in single class. In case the link goes down, could you please expand your answer to include information on how to do this? Error creating bean with name ‘com.

To configure the Lferay view resolver, add a bean to your application context file portlet-context. The Spring front controller needs to know where the application context file is, so specify it as an initialization parameter in the portlet.


These properties describe the Liferay plugin, declare its resources, and specify its security related parameters. For doing this first we create a simple Portlet and then convert it into Spring Portlet.

Configuring a Spring MVC Portlet

Now the front controller, org. You need change your web. With Spring MVC, you can only support one portlet phase in each controller. Find the complete DTD here. Develop your controllers and your views as you normally would in a Spring MVC portlet.

For more info visit: Now mvvc front controller, org. Next consider how to package and deploy your Spring MVC portlet. Liferay is an open platform in an ecosystem of open platforms. PanwarS87 84 1 Cannot create inner bean ‘com. Here I cannot add the whole code.

Spring MVC Portlet

Add Portlet to control Panel. One way is by calling the static utility methods. The DTD is here. Service Hook in Liferay. Next configure your web application. You are using the wrong flavour mvcc Spring mvc here.

Spring MVC – Liferay – Liferay Developer Network

Develop your controllers and your views as you normally would in a Spring MVC portlet. ServletRequest s and back again. Edit Mode Controller An edit mode controller might contain render methods and action methods. Find the complete DTD here. Almost identical to any other Spring MVC portlet. They define the Liferay roles used in the portlet. Your application must be able to convert javax. It covers the high points, assuming you already have familiarity with Spring MVC.


Piferay, you dont have to download any jars from anywhere.

For the details on implementing a service tracker, read the Service Trackers tutorial. Then you can take advantage of the Declarative Services Component and Reference annotations, which let you avoid the boilerplate code associated with service trackers. MF file when you deploy your WAR file. Sign up using Email and Liferqy.

Email Required, but never shown. Liferay Descriptors Liferay portlet plugins that are packaged as WAR files should include some Liferay specific descriptors.

It is perfectly valid to bring the tools and experience you have from other development projects over to Liferay. Hans Westerbeek 4, 3 27 Additionally, you need a mechanism that lets your portlet plugin react gracefully to the possibility of the service implementation becoming unavailable entirely.

Your application must be able to convert javax. The DTD is found here. NullPointerException Hope anybody can help me