Skip to main content

SpringMVCPortlets using JSR-286(Spring 3.0)

SpringMVC portlet framework that wish to make use of the JSR-286 features need to have Spring 3.0 jars and the relevant methods need to be implemented in the code.

All JSR-286 features are supported in Spring 3.0 Portlet WebMVC framework.


To Convert SpringWebMVC 2.0 portlet to SpringWebMVC3.0 portlet, the changes required are listed below.

1) portlet.xml , for changes to portlet 2.0 schema from portlet 1.o schema.

2) liferay-display.xml, for changes to DTD for liferay 5.2.*, as it was there for liferay 4.0 previously.(This is specific to liferay, requires no change on other servers)

3) liferay-portlet.xml for changes to DTD for liferay 5.2.*, as it was there for liferay 4.0 previously.(This is specific to liferay, requires no change on other servers)

4) removed spring 2.0 jars from WEB-INF/lib and added spring 3.0 jars to WEB-INF/lib

5) added portlet.jar in the WEB-INF/lib as it contains the support for Portlet 2.0 specification, excluded this jar during WAR creation as liferay contains duplicate jars.(This jar name is taken from liferay , may be different if the target server is diferent)

6) build.xml for excluding the portlet.jar during WAR creation.(This is required as the target server may contain duplicate jar with the same name and may fail the deployment).

7) common.xml for chages DTD for spring 3.0

8) *-portlet.xml for changes DTD for spring 3.0

9) Add new imports to the Controller classes and implement EventAwareController,ResourceAwareController interfaces and their methods

All of the Portlet2.0(JSR-286) features can be implemented by following the steps above.


Comments

  1. Do you any sample code which uses spring mvc porlets (JSR 268) and do inter portlet communication or doing some thing like Remote Control Portlet.
    I am not able to make this combination work sp. when in 3.0 you are suppose to use annotations.

    ReplyDelete

Post a Comment

Popular posts from this blog

Design Patterns using Java

According to Gang of Four(GOF) any software is classified in to one of the three categories. I read so many books about design patterns which provide a lot of information about Design Patterns in a language neutral way or related to a particular programming language. I am trying to complement the great books by providing the precise and concise information that is required in the day to day programming of a Java Developer. Any software can be classified into one of the three categories -Framework, Toolkit, Application. Framework - Framework defines a set of steps to create an application. Framework provides design reuse. Toolkit - Toolkit provides some utility functions to an existing application. Toolkit provides code reuse. Application - Application is some thing that is specific to the project, and is not useful outside the context of the current application. Gang of Four divided the Design Patterns in to 3 types based on their usage. There are 3 types of Gang of Fo