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: Zukazahn Kagarisar
Country: Equatorial Guinea
Language: English (Spanish)
Genre: Environment
Published (Last): 8 February 2018
Pages: 76
PDF File Size: 4.60 Mb
ePub File Size: 18.72 Mb
ISBN: 401-5-52510-327-2
Downloads: 48351
Price: Free* [*Free Regsitration Required]
Uploader: Nerisar

Developers creating portlets for Liferay Portal CE 7. In case the link goes down, could you please expand your answer to include information on how to do this? You are using the wrong flavour of Spring mvc here. Jasper Report in Detail.

The DTD is here. Sign up or log in Sign up using Google. Thats it final project Structure is: In addition to any web.

Liferay is easy: Spring MVC Portlet in liferay

Accounting for multiple service implementations, using the best service implementation available taking mvf account the service ranking property. This allows for reuse of the entire Servlet-based View support even in a Portlet environment.

Constructor threw exception; nested exception is java. Find the complete DTD here. I get this error, when I try to deploy: DispatcherPortletcan get a request from the view layer, but there are no actual controller classes to delegate the request handling to.


You have to use Service Trackers. Search Container in Liferay.

Spring MVC

Next configure your web application. Now the front controller, org. Almost identical to any other Spring MVC portlet. Share to Twitter Share to Facebook. Luckily, spring has a specialized version of spring mvc, called spring portlet mvc.

Any Spring Project contain atleast one application context file where all ;ortlet and helper classes are defined. Also, you dont have to download any jars from anywhere. Develop your controllers and your views as you normally would in a Spring MVC portlet. Now the front controller, org. But for clarification Portllet can tell for setting up a SpringMVC portlet you only need to make few changes in your current portlet. Add this to web.

Make sure to define any controller poetlet in your application context file by adding a bean element for each one:. PortletRequest s to javax. Liferay portlet plugins that are packaged as WAR files should include some Liferay specific descriptors.

Using the WAB Generator. Email Required, but never shown. ServletRequest s and back again.

Spring MVC Portlet

By clicking “Post Your Answer”, you acknowledge that you have read our updated terms of serviceprivacy policy and cookie policyand that your continued use of the website is subject to these policies. Service Hook in Liferay. By using Spring Portlet we can handle multiple action request ,multiple resource request in seperate methods. Front Controller after receiving request take help from some helper classes these classes are mention in a seperate file whose name is: Provide an application context file portlet-context.


Your application must be able to convert javax. Then you can take advantage of the Declarative Services Component and Reference annotations, which let you avoid the boilerplate code associated with service trackers. Hans Westerbeek 4, 3 27 PanwarS87 84 1 Here I cannot add the whole code.

It is perfectly valid to bring the tools and experience you have from other development projects over to Liferay. The properties from the last JAR processed are the only ones added to the classpath. But be happy, because with a little code, you can regain those benefits. Provide an application context file portlet-context. For more info visit: We can have multiple action methods in single class.

To configure the Spring view resolver, add a bean to your application context file portlet-context. PortletRequest s to javax. If you want to use a Spring Framework version different from the version Liferay Portal provides, you must name your Spring Framework JARs differently from the ones portal property module.

It covers the high points, assuming you already have familiarity with Spring MVC. The DTD is found here. Add this to the web. Posted by Aditya Bhardwaj at 8: