bea.com | products | dev2dev | support | askBEA |
|
e-docs > WebLogic Server > Programming WebLogic JSP Tag Extensions > Administration and Configuration |
Programming WebLogic JSP Tag Extensions |
Administration and Configuration
The following sections provide an overview of administration and configuration tasks for using JSP tag extensions:
The following steps describe how to configure and deploy a JSP tag library. You can also deploy a tag library as a jar file (see Deploying a JSP Tag Library as a 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.
For more information on editing the Web Application deployment descriptor, see Taglib element.
In your JSP, reference the tag library with a JSP directive. For example:
<%@ taglib uri="myTLD" prefix="mytaglib" %>
For more information on WebLogic JSP, see Programming WebLogic JSP.
Deploying a JSP Tag Library as a JAR File
In addition to the procedure described above, you can also deploy a JSP tag library as a jar file:
For more information, see Creating a Tag Library Descriptor.
jar cv0f myTagLibrary.jar
<taglib>
<taglib-uri>myjar.tld</taglib-uri>
<taglib-location>
/WEB-INF/lib/myTagLibrary.jar
</taglib-location>
</taglib>
For more information, see Writing Web Application Deployment Descriptors.
<%@ taglib uri="myjar.tld" prefix="wl" %>