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: Malara Kajilmaran
Country: Canada
Language: English (Spanish)
Genre: Art
Published (Last): 1 July 2017
Pages: 322
PDF File Size: 1.4 Mb
ePub File Size: 13.51 Mb
ISBN: 798-9-13713-916-4
Downloads: 99207
Price: Free* [*Free Regsitration Required]
Uploader: Gumi

Provide an application context file portlet-context. So how do you call Service Builder services, or other services published in the OSGi service registry?

This allows for reuse of the entire Servlet-based View support even in podtlet Portlet environment. Liferay portlet plugins that are packaged as WAR files should include some Liferay specific descriptors.

Design your model entity and write your service layer portpet normal see the tutorials on Service Builder here. You can simply add them from liferay-war with the help of liferay-plugin-package.

Additionally, you need a mechanism that lets your portlet plugin react gracefully to the possibility of the service implementation becoming unavailable entirely. Luckily, spring has a specialized version of spring mvc, called spring portlet mvc.

The properties files must be on the classpath in order for the module to use them. Create Portlet with Maven. For example, suppose that a portlet has several JARs containing these properties files: Provide an application context file portlet-context.


Deploying simple Spring MVC Portlet to Liferay – Stack Overflow

Service implementations could be removed and added at any time, and your plugin needs to be able to account for that. Your application must be able to convert javax. A complete list of the attributes you can set can be found here. PortletRequest s to javax. Error creating bean with name ‘com. Lets Start this step by step: You must also provide some necessary descriptors for Liferay. Any Spring Project contain atleast one application context file where all beans and helper classes are defined.

Website OC4J 10g Go here for details. Portlet Configuration In the portlet.

For usage with Portlets, this Servlet is necessary to force the portlet container nvc convert the PortletRequest to a ServletRequest, which it has to do when including a resource via the PortletRequestDispatcher.

Instantiate a new org. Sign up using Email and Password. The DTD is here.

By using Spring Portlet we can handle multiple action request ,multiple resource request in seperate methods. Constructor threw exception; nested exception is java. Liferay is an open platform in an ecosystem of open platforms. Add Lifefay to control Panel. Add this to web. For more info visit: Liferay Descriptors Liferay portlet plugins that are packaged as WAR files should include some Liferay specific descriptors.

For doing this first we create a simple Portlet and then convert it into Spring Portlet.

Next consider how to package and deploy your Spring MVC portlet. Make sure to define any controller classes in your application context file by adding a bean element for each one:. Post as a guest Name. MF file when you deploy your WAR file. In addition to your Spring MVC configuration, your web. Sign up or log in Sign up using Google. You have to use Service Trackers. Email Required, but never shown. In case the link goes down, could you please expand your answer liferat include information on how to do this?


One way is by calling the static utility methods.

Spring MVC Portlet – Liferay – Liferay Developer Network

Find the complete DTD here. PanwarS87 84 1 Share to Twitter Share to Facebook. Jasper Report in Detail. I get this error, when I try to deploy: With Spring MVC, you can only support one portlet phase in each controller. Stack Overflow works best with JavaScript enabled. The DTD is found here. Nvc be happy, because with a little code, you can regain those benefits.

Spring MVC Portlet

Accounting for multiple service implementations, using the best service implementation available taking into account the service ranking property.

For the details on implementing a service tracker, read the Service Trackers tutorial. MF file when you deploy your WAR file.