掲示板

Integrating LMS portlets into Liferay

13年前 に Alex Berezin によって更新されました。

Integrating LMS portlets into Liferay

Junior Member 投稿: 30 参加年月日: 10/08/20 最新の投稿
Hello,

I am new to Liferay and I want to bring in some JSR168 portlets from my LMS. The vendor provides a .WAR file that needs to be installed in Liferay but they do not support Liferay and therefore require a custom portlet handler file to be built. They include an example for WebSphere which looks like this:

package com.saba.jsrportlet;

import java.io.IOException;
import javax.portlet.PortletException;
import javax.portlet.RenderRequest;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;

// Referenced classes of package com.saba.jsrportlet:
// SabaPortletHandler

public class SabaWebspherePortletHandler extends SabaPortletHandler
{

public SabaWebspherePortletHandler()
{
}

protected Cookie[] getCookies(RenderRequest request)
throws PortletException, IOException
{
HttpServletRequest httpRequest = (HttpServletRequest)request;
return httpRequest.getCookies();
}
}

What needs to be included in the Liferay Portlet handler file?

Thanks!
13年前 に Alex B によって更新されました。

RE: Integrating LMS portlets into Liferay

Junior Member 投稿: 30 参加年月日: 10/08/20 最新の投稿
Has anyone done this before?
thumbnail
13年前 に Sandeep Nair によって更新されました。

RE: Integrating LMS portlets into Liferay

Liferay Legend 投稿: 1744 参加年月日: 08/11/06 最新の投稿
Any success on this?
thumbnail
13年前 に Mika Koivisto によって更新されました。

RE: Integrating LMS portlets into Liferay

Liferay Legend 投稿: 1519 参加年月日: 06/08/07 最新の投稿
I have no idea if this works but try something like this. The key here is that instead of casting RenderRequest you can use PortalUtil.getHttpServletRequest() to get access to the HttpServletRequest.

package com.saba.jsrportlet;

import com.liferay.portal.util.PortalUtil;

import java.io.IOException;
import javax.portlet.PortletException;
import javax.portlet.RenderRequest;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;

// Referenced classes of package com.saba.jsrportlet:
// SabaPortletHandler

public class SabaLiferayPortletHandler extends SabaPortletHandler
{

public SabaWebspherePortletHandler()
{
}

protected Cookie[] getCookies(RenderRequest request)
throws PortletException, IOException
{
HttpServletRequest httpRequest = PortalUtil.getHttpServletRequest(request);
return httpRequest.getCookies();
}
}