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.
|Published (Last):||17 March 2011|
|PDF File Size:||18.53 Mb|
|ePub File Size:||17.73 Mb|
|Price:||Free* [*Free Regsitration Required]|
Liferay is easy: Spring MVC Portlet in liferay
DispatcherPortletcan get a request from the view layer, but there are no actual controller classes to delegate the request handling to. I get this error, when I try to deploy: For doing this first we create a simple Portlet and then convert it into Spring Portlet.
For more info visit: Provide an application context file portlet-context. Find the complete DTD here. Also, you dont have to download any jars from anywhere. You can simply add them from liferay-war with the help of liferay-plugin-package.
Spring MVC Portlet
Provide an application context file portlet-context. Sign up or log in Sign up using Google. Service implementations could be removed and added at any time, and your plugin needs to be able to account for that. Add page, layout,Portlet Programatically. ServiceTracker to track the service of the type you need. The Spring front controller needs to know where the application context file is, so specify it as an initialization parameter in the portlet. Search Container in Liferay.
PanwarS87 84 1 Thats it final project Structure is: You have to use Service Trackers.
In addition to your Spring MVC configuration, your web. Website OC4J 10g One way is by calling the static utility methods. Instantiation of bean failed; nested exception is org. Instantiate a new org.
But for clarification I can tell for setting up a SpringMVC portlet you only sprign to make few changes in your current portlet. Add this to web. It is perfectly valid to bring the tools and experience you have from other development projects over to Liferay.
Spring MVC – Liferay – Liferay Developer Network
To configure the Spring view resolver, add a bean to your application context file portlet-context. So how do you call Service Builder services, or other services published in the OSGi service pportlet Next configure your web application. ServletRequest s and back again.
Service Hook in Liferay. Go here for details. Lets Start lferay step spfing step: NullPointerException Hope anybody can help me We can have multiple action methods in single class.
Design your model entity and write your service layer as normal see the tutorials on Service Builder here. This allows for reuse of the entire Servlet-based View support even in a Portlet environment. Liferay Descriptors Liferay portlet plugins that are packaged as WAR files should include some Liferay specific descriptors. You are using the wrong flavour of Spring mvc here. The Spring front controller needs to know where the application context file is, so specify it as an initialization parameter in portlet.