Programming WebLogic JSP Tag Extensions
The following sections provide an overview of administration and configuration tasks for using JSP tag extensions:
The following steps describe how to configure a JSP tag library. You can also package a tag library as a jar
file (see Packaging a JSP Tag Library as JAR File).
For more information, see Creating a Tag Library Descriptor.
<taglib>
<taglib-uri>myTLD</taglib-uri>
<taglib-location>WEB-INF/library.tld</taglib-location>
</taglib>
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.
In your JSP, reference the tag library with a JSP directive. For example:
<%@ taglib uri="myTLD" prefix="mytaglib" %>
WEB-INF/classes
directory of your Web application.
In addition to the procedure described in the previous section Configuring JSP Tag Libraries, you can also package a JSP tag library as a jar
file:
For more information, see Creating a Tag Library Descriptor.
jar
file by executing the following command from the directory you created in step 2.jar cv0f
myTagLibrary.jar
web.xml.
For example:<taglib>
<taglib-uri>myjar.tld</taglib-uri>
<taglib-location>
/WEB-INF/lib/myTagLibrary.jar
</taglib-location>
</taglib>
<%@ taglib uri="myjar.tld" prefix="wl" %>