You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by arnold4sho <tu...@hotmail.com> on 2010/03/13 13:21:42 UTC

Re: MyFaces in OSGi problem


Hi

I have problems running JSF in an OSGi environment. I am using jetty web
container and equinox to provide the OSGi functionality. The structure of my
application is as follows:
The first bundle has all the JSF libs, web.xml and a config.xml. It looks as
the following:
                           webapplication1
                           ----src/main/java
                           -------de/package
                           ----------Activator.java
                           ----------JSFResolver.java
                           ----src/main/resource
                           ------ WebContent
                           ----------META-INF
                           -------------face-config.xml
                          --------------web.xhtml
                           ----------start.xhtml
                          -----------include.xhtml
                          ----libs (containing all JSF required Jars)

The structure of the second bundle is as follows:
                           webapplication2
                           ---src/main/java
                           ------de/package
                           ----------Bean.java
                           ---src/main/resource
                           ------META-INF
                           ---------face-config.xml
                           ------WebContent
                           ---------index.xhtml
                                           
When running the application of equinox, the webapplication1 is the main
bundle where all the browser requests are sent to. In the second bundle, the
'index.xhtml' file can be retrieved the by first bundle upon request. The
'index.xhtml' in bundle 2 gets its values and properties from the
'Bean.java' in bundle 2. The problem comes when i request the 'index.xhtml',
the Bean.java class is not found. I think this is because the class loader
of bundle1 cannot find it, it has no knowledge of it. So i would like to ask
if anyone knows how to solve this problem. If so please do assist me, i have
tried all the possibilities i had.. I have provided my 
http://old.nabble.com/file/p27887378/workspace_current.rar
workspace_current.rar bundles as attatchments.

Is it infact possible  to have JSF run on multiple bundles using the same
FaceletsContex? Can i be able to have seperate faces-config.xml files in
each bundle, which can all be connected other faces-config.xml in other
bundles? Can anyone please provide me a solution. Sample code would help. 

thanks 

Arnold
-- 
View this message in context: http://old.nabble.com/MyFaces-in-OSGi-tp27536652p27887378.html
Sent from the My Faces - Dev mailing list archive at Nabble.com.