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

Running Multiple Operating Systems(Windows and Ubuntu Linux) on the same machine

VMWare Player is a freely downloadable VMWare. Download VMWare player software and install it on your windows OS download an image of the Ubuntu Linux Desktop version called Ubuntu from http://www.ubuntu.com/getubuntu/download that in iso image format. Then download VMWare configuration bundle that contains a list of files, extract those file to some folder like C:\OS\. Then edit the file" os.vmx file and give the path of the .iso image in that file in the line like below. ide1:0.fileName = C:\OS\ubuntu-8.10-desktop-i386.iso" Now open the file os.vmx file using the vmware player, that will open the Ubuntu OS. You will get a list of options in that select the option install Ubuntu without changing your current configuration of the system Now that will start the Ubuntu OS in a window inside your windows OS. Now you have a browser and all the applications inside the Ubuntu OS, you can start working on that. Double click on this window/expand it to show in full screen. To switch ...