Hi,

see comments inline.

Regards, Achim

Am 24.08.2011 21:15, schrieb bitec:
Ok, fixed this one.

As the hack, I removed legacy "export-package" from pax-web-jsp bundle
Manifest file:

ok, I added the el language for convenience to get 1.2 faces running.


javax.servlet.js
  p;version="1.1.2",javax.servlet.jsp.el;version="1.1.2",javax.servlet.
  jsp.jstl.core;version="1.1.2",javax.servlet.jsp.jstl.fmt;version="1.1
  .2",javax.servlet.jsp.jstl.sql;version="1.1.2",javax.servlet.jsp.jstl
  .tlv;version="1.1.2"

After this the el language seemed to work ok.
The better way (will check tomorrow) is to write versions for *javax.el* and
others explicetely in my import-packages header. By default they got the old
ones

You surely should always make sure you only import the packages you
require by adding the required version range.

The fix for tag libraries is borrowed from this
post:http://groups.google.com/group/spring-osgi/msg/8d12c504c3a6f98d?pli=1

I replaced the DefaultFaceletConfigResourceProvider from myfaces and loaded
tag libraries explicetely:

URL url1 = getClassLoader().getResource("META-INF/primefaces-i.taglib.xml");
         URL url2 =
getClassLoader().getResource("META-INF/primefaces-p.taglib.xml");

         urlSet.add(url2);
         urlSet.add(url1);


I can say, that working with osgi is like terror. The last thing, which I
didn't solve: images from PF were not loaded successfully. Everything else
seem to work. Hope my posts will help anyone else

it's not OSGi that is the terror here, it's more the issue of all those dynamic class-loading things that give you hell here :-) JSF in particular is not easy to get
the way you want it.

Pax-Web JSP does try to get around this by
1) altering the usage of the classloader
2) scanning the libraries of the bundle for contained taglibs.
3) fails on the using the javax.faces.context.FacesContextFactory for initializing MyFaces 2.0 :(

I'm working on supporting MyFaces 2.1 and Servlet 3.0 right now I might also find a solution for 3 then :-)


--
View this message in context: 
http://karaf.922171.n3.nabble.com/JSF-and-apache-servicemix-4-4-0-fuse-00-43-problems-tp3277669p3281853.html
Sent from the Karaf - User mailing list archive at Nabble.com.


--
--
*Achim Nierbeck*


Apache Karaf<http://karaf.apache.org/>  Committer&  PMC
OPS4J Pax Web<http://wiki.ops4j.org/display/paxweb/Pax+Web/>    Committer&  
Project Lead
blog<http://notizblog.nierbeck.de/>

Reply via email to