title: Deploying JSF 2.0 portlet on Websphere Portal 8
body: <p>I've got problem running JSF 2.0 Portlet in Websphere Portal 8. If I don't use <code>&lt;f:ajax&gt;</code> tag it looks like application works somehow. But when I add <code>&lt;f:ajax&gt;</code> portlet is not rendered and in SystemOut.log I can see:</p>
  
  <pre><code>0000003c FaceletViewDe E   Error Rendering View[/views/Home.xhtml]
                                   java.lang.NullPointerException
      at com.ibm.faces20.portlet.util.WebXMLParser.endElement(WebXMLParser.java:115)
      at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
      at javax.xml.parsers.SAXParser.parse(Unknown Source)
      at com.ibm.faces20.portlet.util.WebXMLParser.&lt;init&gt;(WebXMLParser.java:51)
      at com.ibm.faces20.portlet.httpbridge.PortletResource.getRequestPath(PortletResource.java:106)
      at org.apache.myfaces.shared_impl.renderkit.html.util.ResourceUtils.renderDefaultJsfJsInlineIfNecessary(ResourceUtils.java:204)
      at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:69)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:535)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:626)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:622)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:622)
  ...
  </code></pre>
  
  <p>I've configured application to use IBM Portlet bridge included in WebSphere Application Server 8. In faces-config.xml I added:</p>
  
  <pre><code>&lt;view-handler&gt;com.ibm.faces20.portlet.FaceletPortletViewHandler&lt;/view-handler&gt;
  &lt;resource-handler&gt;com.ibm.faces20.portlet.httpbridge.PortletResourceHandler&lt;/resource-handler&gt;
  &lt;el-resolver&gt;com.ibm.faces20.portlet.PortletELResolver&lt;/el-resolver&gt;
  </code></pre>
  
  <p>In portlet.xml I use IBM classes like:</p>
  
  <pre><code>...
  &lt;portlet-class&gt;com.ibm.faces20.portlet.FacesPortlet&lt;/portlet-class&gt;
  &lt;init-param&gt;
      &lt;name&gt;com.ibm.faces.portlet.page.view&lt;/name&gt;
      &lt;value&gt;/views/Home.xhtml&lt;/value&gt;
  &lt;/init-param&gt;
  ...
  </code></pre>
  
  <p>I found out that when I remove 
  <code>&lt;resource-handler&gt;com.ibm.faces20.portlet.httpbridge.PortletResourceHandler&lt;/resource-handler&gt;</code> from faces-config.xml application works even with  tags. But than <strong>jsf.js</strong> is missing so all AJAX JavaScript calls fails. Thus application acts like if no  is present.</p>
  
  <p>I would be gratefull for any help or advice.  </p>
  
  <p>I'm trying to make JSF 2.0 portlets run on WebSphere Portal 8 for 5 days now, with almost no success and lot of pain. It's very difficult with little documentation, <strong>no sources</strong> (I have to decompile classes!). Crappy proprietary closed-source!</p>