IIRC I had the same problem. I keep them in the webapp and "everything is fine".
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.
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.
Yes, it is the same.
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".
1 of 1 people found this helpful
What 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)
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.
I waited for JBoss AS 7.1 to test this suggestion - and it indeed works.
Here is the solution for Richfaces:
<module xmlns="urn:jboss:module:1.1" name="com.myproject.richfaces">
<!-- Insert resources here -->
jboss_deployment_structure.xml (in Ear META-INF)
<!-- This allows you to define additional dependencies, it is the same
as using the Dependencies: manifest attribute -->
P.S. Ear now less than 200Kb was over 3.6Mb
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
except for where JBoss already defined them like javax.api?
All of the above ARE already defined by jboss. My modules are all called com.myproject...
Hey guys, this seems just great!
I would love to see this module as part of RichFaces distribution!
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: