The JavaServer Pages technology provides a set of standard action elements for performing actions on information. The <jsp:getProperty> element is an example of a commonly used action element. You can extend the set of action elements through custom tags that are defined in tag libraries, such as the JSTL tag library.
This topic shows how to use a tag from a tag library JAR file, and then shows how to use a tag from a tag library directory that contains tag files.
To use a tag from a tag library JAR file:
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/ea/sql" %> <sql:transaction dataSource="${myDatasource}">
![]() |
If the tag library is going through frequent changes and you use it in several web modules, you might not want to maintain several copies. In this case, you can put the JAR file in the ide-install-path/lib/ext directory and in the server's shared libraries directory. However, if the JAR file is not in the WEB-INF/lib directory, code completion will not work for the tags in that tag library. |
To use a tag from a tag library directory:
<%@ taglib prefix="sql" tagdir="/WEB-INF/tags/sqltags" %> <sql:transaction dataSource="${myDatasource}">
See Also | |
---|---|
About Tag Libraries Using Tag Libraries Adding Tag Files to Web Modules Creating TLD Files Creating and Editing Tags Deploying Tag Libraries About JSP Syntax |