Hello Ime, Sure -- just place a faces-config.xml file in the META-INF directory of the JAR file. This is how all of the component libraries add their own configuration, and I often use it to configure JSF artifacts in shared modules. --- Kito D. Mann | twitter: kito99 | Author, JSF in Action Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info | twitter: jsfcentral +1 203-404-4848 x3
Public JSF 2 Training this January in London: JSF 2 Update for JSF 1.x users (http://bit.ly/jsf2updatecourse<http://skillsmatter.com/course/java-jee/jsf2-update-course>) and JSF 2 in Action (http://bit.ly/jsf2course<http://skillsmatter.com/course/java-jee/jsf-and-ajax> ) On Fri, Dec 3, 2010 at 8:40 AM, Ime Asangansi <[email protected]> wrote: > Is it possible also that each module has its faces-config.xml? > So, that they are all aggregated from the jars? > > TIA. > > Ime > > Sent from my Nokia phone > -----Original Message----- > From: Mark Struberg > Sent: 03/12/2010 9:43:58 am > Subject: Re: serving views from jar files > > Hi Dan! > > You might take a look at Jason Lees blog if this is what you need: > > http://blogs.steeplesoft.com/2010/05/putting-facelets-in-a-jar/ > > look at the custom ResourceResolver. > You can also find this info in the JavaDoc (found the ResourceResolver > trick in 2009 somewhere else too at least). > > LieGrue, > strub > > --- On Fri, 12/3/10, Dan Corneanu <[email protected]> wrote: > > > From: Dan Corneanu <[email protected]> > > Subject: serving views from jar files > > To: [email protected] > > Date: Friday, December 3, 2010, 8:15 AM > > Hi, > > I'm using JSF 2.0 (myfaces 2.0.2). > > > > I am trying to implement a modularization solution for my > > application. > > The basing idea is that I would like to be able to pack > > some xhtml view > > definitions in a jar file and put it on the classpath and > > be able to use > > this views as values of |<to-view-id>| in navigation > > rules. > > Is this possible? > > Ex. > > > > |<to-view-id>/plugins/foobar/foo.xhtml</to-view-id> > > | > > > > I would like this id to be associated with an XHTML file > > located at > > jar:file:foobar.jar!/foo.xhtml > > I have tried to implement a custom resource loader but it > > seems that in > > the process of finding the right xhtml file to associate > > with a view ID, > > the implementation is always looking for the existence of a > > file on the > > local file system. Is there any extension point in the JSF > > 2.0 API that > > I can use in order to modify this behavior? > > > > Best regards, > > Dan. > > > > > > > > >

