In this example the tag library descriptor is a file called library.tld. Always specify the location of the tld relative to the root of the Web application.
Place the tag library descriptor file in the WEB-INF directory of the Web application.
Reference the tag library in the JSP page.
In your JSP, reference the tag library with a JSP directive. For example:
<%@ taglib uri="myTLD" prefix="mytaglib" %>
Place the tag handler Java class files for your tags in the WEB-INF/classes directory of your Web application.
Create a directory containing the compiled Java tag handler class files used in your tag library.
Create a subdirectory of the directory you created in step;2 and call it META-INF.
Copy the taglib.tld file you created in step;1 into the META-INF directory you created in step;3.
Archive your compiled Java class files into a jar file by executing the following command from the directory you created in step;2.
jar cv0f myTagLibrary.jar
(where myTagLibrary.jar is a name you provide)
Copy the jar file into the WEB-INF/lib directory of the Web application that uses your tag library.
Reference the tag library in your JSP.
For example:
<%@ taglib uri="taglib.tld" prefix="wl" %>
A more flexible alternative would be to perform steps 1 through 6 and then reference the tag library descriptor in the Web application deployment descriptor, web.xml.