Fórumok
Challenges of integrating a JSF application with Liferay Portal
Anand Raman, módosítva 11 év-val korábban
Challenges of integrating a JSF application with Liferay Portal
New Member Bejegyzések: 8 Csatlakozás dátuma: 2012.11.23. Legújabb bejegyzések
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
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, módosítva 11 év-val korábban
RE: Challenges of integrating a JSF application with Liferay Portal
Liferay Legend Bejegyzések: 2655 Csatlakozás dátuma: 2005.07.27. Legújabb bejegyzések
When developing your JSF web application, be sure to avoid any casts to HttpServletRequest, HttpServletResponse, etc. Instead, use the methods on ExternalContext(). For example:
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.
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
// Incompatible with portlets
HttpServletRequest request = (HttpServletRequest) externalContext.getRequest();
String attributeValue = (String) request.getAttribute("foo");
String parameterValue = request.getParameter("bar");
// Compatibile with both webapps and portlets:
String attributeValue = (String) externalContext.getRequestMap().get("foo");
String 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.