I have got the following code to get a portlet init parameter "javax.portlet.faces.defaultViewId.view" from FacesContext.
FacesContext fc = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
PortletContext portletContext = (PortletContext) externalContext.getContext();
return String defaultView = portletContext.getInitParameter("javax.portlet.faces.defaultViewId.view");
portlet.xml file contains the init param:
<init-param>
<name>javax.portlet.faces.defaultViewId.view</name>
<value>/pages/setup/page.xhtml</value>
</init-param>
My portlet is deployed in Liferay and uses Liferay Faces Bridge. When the above code is executed, I always get null value for defaultValue. Please can someone tell what I am doing wrong?