bundle the tag classes in a jar file. Make sure to include the taglib {library}.tld file located in the /WEB-INF directory
add the tag {library}.jar file to the CLASSPATH
copy the {library}.jar file to the /WEB-INF/lib directory
define the taglib element in the /WEB-INF/web.xml file. For example:
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/{library}</taglib-uri>
<taglib-location>/WEB-INF/{library}.tld</taglib-location>
</taglib>
define the tag extension in the jsp page. The <taglib-uri> and the uri directive must match. The prefix identifies the tags in the tag library within the jsp page. For example:
<%@ taglib uri="http://jakarta.apache.org/taglibs/{library}" prefix="x" %>
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: javax/servlet/jsp/tagext/TagLibraryValidator
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:481)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
.....
root cause
java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
..............