フォーラム

ホーム » Liferay Faces » Liferay Faces - English

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Anand Raman
Challenges of integrating a JSF application with Liferay Portal
2012/12/07 7:10
答え

Anand Raman

ランク: New Member

投稿: 8

参加年月日: 2012/11/22

最近の投稿

Good day,

We are planning to develop our application using JSF and then integrate it into Liferay using the Liferay Faces Bridge. We would typically perform the integration at the end of each release cycle. What are the typical challenges that can come up during integration?

Best regards,
Anand
Neil Griffin
RE: Challenges of integrating a JSF application with Liferay Portal
2012/12/07 8:08
答え

Neil Griffin

LIFERAY STAFF

ランク: Liferay Legend

投稿: 2335

参加年月日: 2005/07/26

最近の投稿

When developing your JSF web application, be sure to avoid any casts to HttpServletRequest, HttpServletResponse, etc. Instead, use the methods on ExternalContext(). For example:

 1FacesContext facesContext = FacesContext.getCurrentInstance();
 2ExternalContext externalContext = facesContext.getExternalContext();
 3
 4// Incompatible with portlets
 5HttpServletRequest request = (HttpServletRequest) externalContext.getRequest();
 6String attributeValue = (String) request.getAttribute("foo");
 7String parameterValue = request.getParameter("bar");
 8
 9// Compatibile with both webapps and portlets:
10String attributeValue = (String) externalContext.getRequestMap().get("foo");
11String parameterVale = externalContext.getRequestParameterMap().get("bar");


By following this type of approach, you will increase your chances that your JSF web application will be deployable as a portlet during your integration phase.