Provide Taglib in custom module
lostiniceland Dec 19, 2017 3:54 AMHello everyone
After playing around with JBoss modules I would like to isolate all Struts 1.3! dependencies in a custom module.
<?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.3" name="org.apache.struts"> <resources> <resource-root path="struts-core-1.3.10.jar" /> <resource-root path="struts-el-1.3.10.jar" /> <resource-root path="struts-taglib-1.3.10.jar" /> <resource-root path="struts-tiles-1.3.10.jar" /> <resource-root path="struts-cdi-0.0.1-SNAPHOT.jar" /> <resource-root path="commons-chain-1.2.jar" /> <resource-root path="commons-digester-1.8.jar" /> <resource-root path="commons-validator-1.3.1.jar" /> <resource-root path="oro-2.0.8.jar" /> </resources> <dependencies> <module name="javax.enterprise.api" export="true"/> <!-- not sure if I need api or impl yet <module name="org.jboss.weld.core"/> <module name="org.jboss.weld.spi"/> --> <module name="javax.api" /> <module name="javax.servlet.api" export="true" /> <module name="javax.servlet.jsp.api" export="true" /> <module name="javax.servlet.jstl.api" export="true" /> <module name="org.slf4j" export="false"/> <module name="org.antlr" export="false"/> <module name="org.apache.commons.beanutils" export="false" /> <module name="org.apache.commons.collections" export="false"/> <module name="org.apache.commons.logging" export="false"/> </dependencies> </module>
The server starts up fine, no problems with Classloading, but when accessing a WAR which uses Struts, the taglibs cannot be resolved.
I've found an old issue which was rejected saying the TLD scanning is not supported. But this was 6 years ago and when having a look at the java.servlet.jstl.api there must be a way to scan for the included TLDs.
Some time ago I did exactly this (encapsulating all Stuts deps in a module) for IBM Liberty profile and there was some additional integration code necessary to make the embedded TLDs visible. Maybe thats also necessary for JBoss Modules.
So, bottom line: what do I have to do to make TLDs within a module visible to a WAR-deployment?