Now all you have to do is create a TLD (tag Library Descriptor) file to register your custom tag, as shown in Listing 4.
现在要做的全部工作就是创建一个TLD(标记库描述符)文件,以登记定制标记,如清单4所示。
Make the TLD file and handler classes accessible.
使TLD文件和处理程序类可访问。
You will recall that we have already placed the tag handler class in the classes directory, in Step 1, so we actually only have to store the TLD file.
您可以回忆起在第1步中我们已经将标记处理程序类放到了classes目录中,所以我们实际上只需储存tld文件。
Each fragment to the left of the TLD is a subdivision of the original domain.
TLD左边的每个片段是该原始域的细分。
For this example, we「ll use the second approach, placing the TLD file and classes loosely within the Web application directory structure.
在这个例子中,我们将使用第二种方法,将TLD文件和类分散地放到Web应用程序目录结构中。
Define a TLD file for the table tag.
为表格标记定义一个tld文件。
The dynamic approach has the JSP page point directly to the location of the TLD and is therefore processed at JSP page translation time.
动态方法让JSP页直接指向TLD位置,因而是在解释JSP页面时进行处理。
To ensure that the Web application class loader picks up the portlet TLD files, you must also declare the portlet taglib directly, as shown in Listing 10.
为了确保Web应用程序类装入器获得portletTLD文件,您还必须直接声明portlettaglib,如清单10 所示
Once you」ve defined a TLD file, you can start using the tag in JSPs, as in the following example.
一旦定义了TLD文件,就可以开始在JS p中使用标记了,如下面示例所示。
The TLD file for our XSS custom tag library, is shown in Listing 1.
清单1显示了我们的xss定制标记库的tld文件。
TLD (tag library descriptor).
TLD(标记库描述符)。
If you use JSF 1.1, the TLD file should conform to the syntax defined by the JSP 1.2 specification (see Listing 21).
如果使用的是JSF 1.1,TLD文件应该遵从jsp 1.2规范定义的语法(参见清单21)。
Use the site: operator to restrict your search to a TLD (like.edu), domain, subdomain or even a pattern.
使用「site:operator」使你的搜索限制为一个TLD(如「 . edu 」),域名,子域名,甚至是样式。