To deploy a tag library for use in a web module, you must first package it as a JAR file.
To package a tag library as a JAR file:
You can deploy a tag library to a web module in three ways:
.tld
file available in the WEB-INF
directory, and by placing tag handler classes in packages under the WEB-INF/Classes
directory. The tag library is not actually packaged, but you can make changes
to the handler classes and customizers and see immediate results. This method
is convenient for testing your tag library as you develop it. ![]() |
Situations exist on Windows platforms in which you might not be able to paste your taglib JAR file into the WEB-INF/lib directory, for example, when a taglib JAR with the same name exists, and it is currently being used by the server. If you encounter this problem, refer to the release notes. |
After you deploy the tag library to a web module, modify the Taglib element in the web module's deployment descriptor (web.xml) so that it maps to the JAR file containing the desired tag library. This procedure is not always necessary. In some cases, the IDE adds the Taglib element automatically.
To test a tag library in place:
To cut and paste the JAR File:
See Also | |
---|---|
Using Custom Tag Libraries in Web
Modules Adding a Custom Tag Library from the Filesystem Web Modules (concepts) |