Este contenido no está disponible en el idioma seleccionado.
3.8. Deploy Tag Library Descriptors (TLDs) in a Custom Module
If you have multiple applications that use common Tag Library Descriptors (TLDs), it may be useful to separate the TLDs from the applications so that they are located in one central and unique location. This enables easier additions and updates to TLDs without necessarily having to update each individual application that uses them.
- At least one JAR containing TLDs. Ensure that the TLDs are packed in
META-INF.
Procedure 3.7. Deploy TLDs in a Custom Module
- Using the Management CLI, connect to your JBoss EAP 6 instance and execute the following command to create the custom module containing the TLD JAR:
module add --name=MyTagLibs --resources=/path/to/TLDarchive.jar
module add --name=MyTagLibs --resources=/path/to/TLDarchive.jarCopy to Clipboard Copied! Toggle word wrap Toggle overflow If the TLDs are packaged with classes that require dependencies, use the--dependencies=DEPENDENCYoption to ensure that you specify those dependencies when creating the custom module.When creating the module, you can specify multiple JAR resources by separating each one with:. For example,--resources=/path/to/one.jar:/path/to/two.jar - In your applications, declare a dependency on the new MyTagLibs custom module using one of the methods described in Section 3.2, “Add an Explicit Module Dependency to a Deployment”.
Important
Ensure that you also importMETA-INFwhen declaring the dependency. For example, forMANIFEST.MF:Or, forDependencies: com.MyTagLibs meta-inf
Dependencies: com.MyTagLibs meta-infCopy to Clipboard Copied! Toggle word wrap Toggle overflow jboss-deployment-structure.xml, use themeta-infattribute.
In your applications you can use TLDs that are contained in the new custom module.