Primefaces Resources and Websphere Portal

UI Components for JSF
Post Reply
smitha1410
Posts: 2
Joined: 17 Jan 2012, 08:43

17 Jan 2012, 08:57

I am trying to use Primefaces within an application running on Websphere Portal. I am trying to build a sample app based on portletfaces-bridge and ibm's on JSF 2.0 bridge. In both cases I am having issues with resolving primefaces resources.

The resource url generated by primefaces look like

/.PrimeFacesIBM/portlet/javax.faces.resource/theme.css?ln=primefaces-aristo

within the portlet environment

From what I can see the context root of the application is just "/.PrimeFacesIBM". Looks like "/portlet" is being added somewhere. This happens irrespective of whether I am using "portletfaces-bridge" or "IBM bridge".

Adding "/portlet" to the resource url crap's up webpshere portal

com.ibm.ws.webcontainer.webapp.WebApp logError SRVE0293E: [Servlet Error]-[java.lang.NullPointerException]: java.lang.NullPointerException
at com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1790)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.initialize(GenericServletWrapper.java:79)
at com.ibm.ws.portletcontainer.webextension.PortletExtensionProcessor.createServletWrapper(PortletExtensionProcessor.java:147)

I can serve my own resource using other patterns such as
/.PrimeFacesIBM/faces/javax.faces.resource/test.css?ln=css

As soon as change this to /portlet instead of /faces the same issue happens.

My question is

Is the "/portlet" as JSF 2.0 standard (I could not find any reference to it) ?

Where is this derived from?

Can we change this default behaviour and ask primefaces to retrieve resources from a different url pattern such as
/.PrimeFacesIBM/test/javax.faces.resource/theme.css?ln=primefaces-aristo

Thanks in advance for any assistance.

Prime faces version : 3.0.1
Websphere Portal : 7.0.0.2
Portlet Faces bridge : 2.0.1

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

17 Jan 2012, 10:46

I would ask this question to your portlet brigde. PrimeFaces does not has a own resource handling, it just use JSF2 resource handling
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

17 Jan 2012, 11:03

Yes, try portlet-faces forum.

smitha1410
Posts: 2
Joined: 17 Jan 2012, 08:43

17 Jan 2012, 14:00

Thanks for the quick reply.

After further investigation to make it work using IBM Porlet Bridge I found that we need the following in faces-config to server prime-faces resources


<view-handler>com.ibm.faces20.portlet.FaceletPortletViewHandler</view-handler>
<el-resolver>com.ibm.faces20.portlet.PortletELResolver</el-resolver>
<resource-handler>com.ibm.faces20.portlet.httpbridge.PortletResourceHandler</resource-handler>

After this primefaces works. However there seems to be an issue with this bridge in terms to loading image resources and ajax calls. I will raise this in IBM forum.

With regards to portletfaces-bridge-2.0.1 , it was to do with some misconfiguration in my setup which was causing issue. Ajax calls also seem to work.

starback
Posts: 10
Joined: 26 Mar 2011, 19:58

04 Apr 2012, 12:06

I have the same problem with Primefaces 3.0.1 and WebShere Portal 7. Could you tell me how to configure portletfaces-bridge to resvole it?

hp4jsf
Posts: 3
Joined: 09 Sep 2011, 15:28

02 May 2012, 16:58

smitha1410 wrote:Thanks for the quick reply.

After further investigation to make it work using IBM Porlet Bridge I found that we need the following in faces-config to server prime-faces resources


<view-handler>com.ibm.faces20.portlet.FaceletPortletViewHandler</view-handler>
<el-resolver>com.ibm.faces20.portlet.PortletELResolver</el-resolver>
<resource-handler>com.ibm.faces20.portlet.httpbridge.PortletResourceHandler</resource-handler>

After this primefaces works. However there seems to be an issue with this bridge in terms to loading image resources and ajax calls. I will raise this in IBM forum.

With regards to portletfaces-bridge-2.0.1 , it was to do with some misconfiguration in my setup which was causing issue. Ajax calls also seem to work.
I am facing same issue with images and resouces while using "Data Exporter" with the same JSF bridge you have mentioned. Let me know if you hear any solution from IBM.

Thank you
HP

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 51 guests