-
1. Re: JSF taglibs in AS7 and modules
kwutzke Oct 23, 2011 7:49 PM (in response to jimbrady)IIRC I had the same problem. I keep them in the webapp and "everything is fine".
Karsten
-
2. Re: JSF taglibs in AS7 and modules
jimbrady Oct 24, 2011 5:59 AM (in response to kwutzke)Well yes,
but that is exactly my point. Isn't the idea of modules not to have jar files duplicated in your (potentially mulitple) applications. And I want the module anyway - in order to contain all the dependencies.
-
3. Re: JSF taglibs in AS7 and modules
eduardo.mello.cantu Dec 6, 2011 2:26 PM (in response to jimbrady)I think you're trying to do the same as in http://community.jboss.org/thread/174293.
Anyway, it didn't solve my case.
-
4. Re: JSF taglibs in AS7 and modules
sfcoy Dec 6, 2011 6:19 PM (in response to jimbrady)Section 7.2 of the JavaServer Pages Specification Version 2.2 explains how taglibs are discovered
-
5. Re: JSF taglibs in AS7 and modules
jimbrady Dec 13, 2011 11:16 AM (in response to sfcoy)This is using facelets not JSP.
Besides which, I don't think this is relevant. I also tried extracting the taglib definitions and putting them in the war, but that also doesn't work.
-
6. Re: JSF taglibs in AS7 and modules
jimbrady Dec 13, 2011 11:17 AM (in response to eduardo.mello.cantu)Yes, it is the same.
-
7. Re: JSF taglibs in AS7 and modules
sfcoy Dec 14, 2011 12:17 AM (in response to jimbrady)Have you tried this in your web.xml?
<context-param> <param-name>javax.faces.FACELETS_LIBRARIES</param-name> <param-value>WEB-INF/a4j.taglib.xml;WEB-INF/rich.taglib.xml</param-value> </context-param>
(I've guessed where you may have placed the taglib descriptors)
The spec (§10.3.2) says:
The run time must support two modes of discovery for Facelet tag library descriptors
- Via declaration in the web.xml, as specified in Section 11.1.3 “Application Configuration Parameters”
- Via auto discovery by placing the tag library discriptor file within a jar on the web application classpath, naming the file so that it ends with “.taglib.xml”, without the quotes, and placing the file in the META-INF directory in the jar file.
so I think it should really find them in your module anyway. It kind of depends on exactly what they mean by "web application classpath".
-
8. Re: JSF taglibs in AS7 and modules
ctomc Dec 14, 2011 5:40 AM (in response to jimbrady)1 of 1 people found this helpfulWhat if you try explicit including taglib definitions from your dependant module?
in your jboss-deployment-descriptor.xml
add dependency like this:
<module name="my.module"> <imports><include path="META-INF"/></imports> </module>
or include any path where your taglibs reside.
by default when you add dependency it will add just dependencies to classes and nothing more (not even annotations on these classes)
cheers,
tomaz
-
9. Re: JSF taglibs in AS7 and modules
jimbrady Dec 21, 2011 5:40 AM (in response to ctomc)jboss-deployment-decriptor.xml? Do you mean perhaps jboss-deployment-structure.xml?
I'm using the dependencies in the manifest at the moment. Is there an equivalent?
This sounds like we are almost there, it is the sort of answer I would like.
-
10. Re: JSF taglibs in AS7 and modules
jimbrady Feb 20, 2012 11:01 AM (in response to jimbrady)I waited for JBoss AS 7.1 to test this suggestion - and it indeed works.
Here is the solution for Richfaces:
module.xml
<module xmlns="urn:jboss:module:1.1" name="com.myproject.richfaces">
<resources>
<resource-root path="richfaces-components-api-4.0.0.Final.jar"/>
<resource-root path="richfaces-components-ui-4.0.0.Final.jar"/>
<resource-root path="richfaces-core-api-4.0.0.Final.jar"/>
<resource-root path="richfaces-core-impl-4.0.0.Final.jar"/>
<!-- Insert resources here -->
</resources>
<dependencies>
<module name="org.w3c.css.sac"/>
<module name="net.sourceforge.cssparser"/>
<module name="com.sun.jsf-impl"/>
<module name="javax.api"/>
<module name="javax.faces.api"/>
<module name="javax.xml.bind.api"/>
<module name="javax.xml.jaxp-provider"/>
<module name="com.google.guava"/>
</dependencies>
</module>jboss_deployment_structure.xml (in Ear META-INF)
<
jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1"
>
<!-- This allows you to define additional dependencies, it is the same
as using the Dependencies: manifest attribute -->
</
jboss-deployment-structure>
P.S. Ear now less than 200Kb was over 3.6Mb
-
11. Re: JSF taglibs in AS7 and modules
mpgong Feb 20, 2012 10:45 AM (in response to jimbrady)Quick question about this. So you had to make the modules for the richfaces dependencies? Would things also work if i were to create a single module and put all of the libs in there and not call out dependecies like so
<dependencies>
<module name="org.w3c.css.sac"/>
<module name="net.sourceforge.cssparser"/>
<module name="com.sun.jsf-impl"/>
<module name="javax.api"/>
<module name="javax.faces.api"/>
<module name="javax.xml.bind.api"/>
<module name="javax.xml.jaxp-provider"/>
<module name="com.google.guava"/>
</dependencies>
except for where JBoss already defined them like javax.api?
Thanks
-
12. Re: JSF taglibs in AS7 and modules
jimbrady Feb 20, 2012 11:02 AM (in response to mpgong)All of the above ARE already defined by jboss. My modules are all called com.myproject...
-
13. Re: JSF taglibs in AS7 and modules
lfryc Feb 20, 2012 3:34 PM (in response to jimbrady)Hey guys, this seems just great!
I would love to see this module as part of RichFaces distribution!
-
14. Re: JSF taglibs in AS7 and modules
lfryc Feb 27, 2012 7:48 AM (in response to lfryc)Hi guys,
just for reference, here is the feature request for distributing RichFaces 4 with AS7 module, please vote there or comment if you would like to grab that issue and implement it:
https://issues.jboss.org/browse/RF-12008
Thanks,
~ Lukas