Hi.
I'm struggling with running web application inside OSGI container (service mix or Karaf). I managed to install the web application together with JSF libraries, but for some reasons PF tags are not interpreted and displayed on the page. I think the problem is in either things:
1. OSGI classloading things. I don't know, whether the tag libraries loading is done in some separate classloader, because all trouble in OSGI seem to exits due to classloading
2. Jetty 7.4, which is used as the web container. Can it result in such troubles?
thanks
PF inside OSGI container
Hi,
I don't believe that JSF implementation sit on top of an OSGI stack. As Ed Burns said, it's not specificated. You will not find any words to OSGI in JSF spec. You should add probably Apache MyFaces JSF-2.0 Core OSGi Bundle to your JSF project (JSF API and Impl. are not enough). AFAIK from one of my friends it's possible to develop web applications in OSGI environment. That's for sure, but he has never tried JSF ans OSGI.
I don't believe that JSF implementation sit on top of an OSGI stack. As Ed Burns said, it's not specificated. You will not find any words to OSGI in JSF spec. You should add probably Apache MyFaces JSF-2.0 Core OSGi Bundle to your JSF project (JSF API and Impl. are not enough). AFAIK from one of my friends it's possible to develop web applications in OSGI environment. That's for sure, but he has never tried JSF ans OSGI.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
Hi.
JSF-RI doesn't work at all. (BTW I use the latest SMX/Karaf artifact - apache-servicemix-4.4.0-fuse-00-43.)
Myfaces 2.0.2 works both when in separate bundle and embedded in war file. But only in the latest version, apache-servicemix-4.3.1 failed to load FacesContext )
About web applications - yes, it's possible to use simple jsp applications in OSGI containers (uau!). But you know, I cannot already write simple JSP after using JSF, PF and so on. J2EE 6 tutorial even doesn't contain the JSP code any more
I spent 3 days on struggling with OSGI+JSF+PF
actually I even could not make JSF work ok. The EL, which is embedded into container, blames about the following line:
JSF-RI doesn't work at all. (BTW I use the latest SMX/Karaf artifact - apache-servicemix-4.4.0-fuse-00-43.)
Myfaces 2.0.2 works both when in separate bundle and embedded in war file. But only in the latest version, apache-servicemix-4.3.1 failed to load FacesContext )
About web applications - yes, it's possible to use simple jsp applications in OSGI containers (uau!). But you know, I cannot already write simple JSP after using JSF, PF and so on. J2EE 6 tutorial even doesn't contain the JSP code any more
I spent 3 days on struggling with OSGI+JSF+PF
actually I even could not make JSF work ok. The EL, which is embedded into container, blames about the following line:
Code: Select all
<h:commandButton action="#{propertiesBean.save}" value="save"/>
Though, the bean has such method and everything works ok in Jetty and Tomcat.Caused by: javax.el.ELException: /properties.xhtml: The class 'com.luxoft.drf.web.PropertiesBean' does not have the property 'save'.
at org.apache.myfaces.view.facelets.compiler.AttributeInstruction.write(AttributeInstruction.java:55)
at org.apache.myfaces.view.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:46)
at org.apache.myfaces.view.facelets.compiler.UILeaf.encodeAll(UILeaf.java:214)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:614)
JSF: Mojarra 2.1 | PrimeFaces 2.2.1 | Glassfish 3.1
Guys, need some more help from JSF gurus.
I managed to solve all problems except for images loading. Compared to tomcat I see, that all images in css styles are rendered as:
but are expected to be:
Can anyone advice, how, when and by which code are #{resource..} evaluated? Can this process be interfered somehow?
Thanks.
I managed to solve all problems except for images loading. Compared to tomcat I see, that all images in css styles are rendered as:
Code: Select all
#bfdaff url("#{resource['primefaces:themes/sam/images/sprite.png']}")
Code: Select all
#bfdaff url("/drfusion-war/javax.faces.resource/themes/sam/images/sprite.png.jsf?ln=primefaces&v=2.2.1")
Thanks.
JSF: Mojarra 2.1 | PrimeFaces 2.2.1 | Glassfish 3.1
-
- Posts: 6
- Joined: 06 Feb 2012, 16:40
This is already a very old thread but may I ask what exactly works for you and how did it?
I am not sure but I think that the class Resource should be adapted or so.
I am not sure but I think that the class Resource should be adapted or so.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 46 guests