migration of websphere portlet factory to liferay portal

1k Views Asked by At

Hey Hi,

I am new to liferay. I am trying to migrate portlets developed in websphere 6.1(JSR 286) to liferay 6.1. For time being I have developed a portal(PA_test.war) displaying some text, which I deployed on liferay.

.war file was chosen to-"Upload a WAR file to install a layout template, portlet, or theme."

After processing following messages were shown- "Your request completed successfully." "The plugin was uploaded successfully and is now being installed."

When I tried looking for portal in plugins installed, I could not find the portal. I saw the logs where it says :

INFO: Undeploying context [/PA_test] Jul 30, 2012 7:54:05 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory E:\life\liferay-portal-6.1.0-ce-ga1\tomcat-7.0.23\webapps\PA_test

I want to know :

1) How the portlet is adhering to JSR specifications?

2) What are the major dependency (technology wise) without which the porlet cannot be migrated?

or whether liferay offers an alternative or a bridge to do so

or what's the equialent for websphere 6.1(JSR 286) in liferay?

Please help!!


portlet.xml

<?xml version="1.0"?>

<!--AUTOMATICALLY GENERATED DEPLOYMENT DESCRIPTOR - DO NOT EDIT-->
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" id="com.bowstreet.portlet.WebAppRunner2_test">
    <portlet>
        <description xml:lang="en">Portlet to test migration from wpf to xmlpf</description>
        <portlet-name>Test Portlet</portlet-name>
        <display-name xml:lang="en">Test Portlet</display-name>
        <portlet-class>com.bowstreet.portlet.adapter.WebAppRunnerPortlet286</portlet-class>
        <init-param>
            <name>model</name>
            <value>test</value>
        </init-param>
        <expiration-cache>0</expiration-cache>
        <supports>
            <mime-type>text/html</mime-type>
            <portlet-mode>view</portlet-mode>
        </supports>
        <supported-locale>en</supported-locale>
        <resource-bundle>nls.test</resource-bundle>
        <portlet-info>
            <title>Test Portlet</title>
            <short-title>Test Portlet</short-title>
            <keywords>Test Portlet</keywords>
        </portlet-info>
        <portlet-preferences></portlet-preferences>
    </portlet>
    <custom-portlet-mode>
        <portlet-mode>config</portlet-mode>
    </custom-portlet-mode>
    <custom-portlet-mode>
        <portlet-mode>edit_defaults</portlet-mode>
    </custom-portlet-mode>
    <user-attribute>
        <description xml:lang="en">User Given Name</description>
        <name>user.name.given</name>
    </user-attribute>
    <user-attribute>
        <description xml:lang="en">User Last Name</description>
        <name>user.name.family</name>
    </user-attribute>
</portlet-app>
2

There are 2 best solutions below

0
On

The portlet class you are using is :

com.bowstreet.portlet.adapter.WebAppRunnerPortlet286

I think this is the problem. This is Websphere specific portlet class. Can you please change it to something like

com.test.portlet.TestPortlet

And then write the test class which extends GenericPortlet

 public class TestPortlet extends GenericPortlet {
 .........
 ......
 .....
 super.doView();
}

or you can extend it by Liferay's MVCPortlet class.

If you think you will be using frameworks to develop portlets such as Struts, Spring, JSF etc., You can create a portlet class by extending respective portlet class provided by these frameworks.

Hope this solves your issue.

0
On

As far as I know, Web Experience Factory (formerly WebSphere Portlet Factory) portlets, despite generating JSR (168 or 286) portlet WARs, are currently only licensed for and supported on IBM WebSphere Portal (in addition to JSR APIs, they may also leverage IBM Portal APIs).

I hope that info helps, ..Mike Burati The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.