With all the prep work behind us, we're ready to use our custom tag within a JSP page.
我们完成了所有这些准备工作后,我们就可以在JSP 页面中使用我们的自定义标记了。
So the example usage of this custom tag passes validation.
因此这个自定义标记的示例用法通过了验证。
Listing 1 shows what the handler of the custom tag should look like.
清单1展示了定制标记的处理函数是什么样的。
Listing 16 contains the rpc.tag file, which implements the custom tag.
清单16包含rpc. tag文件,该文件实现定制标记。
The JSP custom tag libraries are a collection of actions presented as tags.
JSP定制标记库是用标记表示的一组行为的集合。
In that case, you want to design a custom tag that supports all these table types.
在这种情况下,就需要设计一个支持所有这些表格类型的自定义标记。
The issue was caused by a custom tag engine, that kept large object lists in memory.
问题是由自定义标签引擎引起的,它会在内存中存放大型对象列表。
It finds what it needs to know about a custom tag by reading metadata about the tag.
它通过读取标记的元数据来确定需要知道自定义标记的哪些信息。
Next, we add a JSP declaration to any page that will need to use the custom tag library.
然后,将JSP声明加入到所有需要使用自定义标记库的页面中。
How does the JSP container know which attributes of a custom tag are required and which are not?
jsp容器如何知道自定义标记的哪些属性是必选的哪些是可选的?
Using the output of one custom tag as the input for another increases the tags' reusability.
将一个定制标记的输出作为另一个定制标记的输入增加了标记的可重用性。
Your simple custom tag is coded and tested. Now you'll build a tag that's a wee bit more sophisticated.
编写并测试过简单的自定义标记之后,现在要构建一个略微复杂一些的标记。
In this series, we have examined the capabilities of the four JSTL custom tag libraries and their usage.
在本系列中,我们讨论了4个JSTL定制标记库的功能及它们的使用。
The custom tag also has an optional params attribute, which can be a single object or an array of objects.
这个定制标记还有一个可选的 params属性,它可以是一个单一的对象或一个对象数组。
JSP pages, however, with their mix of code and custom tag libraries, cannot function well in this environment.
然而,由于jsp页面将代码和自定义标记库相混合,因此无法在这种环境下良好地工作。
As with the Label component, you will need a custom tag to bind the Field component to a JSP, as shown in Listing 7.
像使用Label组件时一样,需要用定制标记把Field组件绑定到JSP,如清单7所示。
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所示。
The use of a custom tag and associated tag library would allow the example above to be converted to that shown in Listing 6.
使用自定义标记和相关的标记库允许把以上示例转换为清单6所示的内容。
Now let's consider a more complex example, where we use the ability of a custom tag to generate more than one bean definition.
现在让我们来考虑一个更加复杂的例子,其中我们要使用自定义标签的能力来产生不止一个bean定义。
All business logic should be in classes, and if you absolutely had to have code in your JSP page, you would wrap it up in a custom tag.
所有的商业逻辑都应该在类中,如果你确实需要在你的JSP页面中包含代码,你应该用自定义标签来包装它。
Perhaps as much as 80 percent of the custom tag functionality that you will need has already been created and standardized by the J2EE community.
您所需要的自定义标记功能中也许有多达百分之八十已经由J2EE团体创建并标准化了。
In this installment of J2EE pathfinder, you've walked through the process of creating a custom tag from scratch and implementing it in a JSP page.
在J2EE探索者的这篇文章中,您经历了从头创建一个自定义标记并在jsp页面中实现它的过程。
When the container encounters a tag, it invokes the tag handler class associated with the custom tag, which is a process we'll talk more about later.
当容器遇到一个标记时,它调用与这个自定义标记相关联的标记处理程序,我们将在后面更多地讨论这个过程。
After defining our BLOB-powered table, we would want to build a JSP for managing the BLOB fields. For this purpose, a new custom tag is introduced.
定义好BLOB表后,我们还要建立一个JSP文件来管理这些BLOB字段。为此,这里引入一个新的自定义标签。
You can use a custom tag on multiple places simply by invoking the tag, and remove the repetition of writing the same piece of code in different places.
可以通过调用这个标记在多个位置使用自定义标记,无需在不同的地方重复编写相同的代码。
We have also demonstrated that the majority of the attacks can be eliminated when a Web site uses a simple custom tag library to properly encode the dynamic content.
我们还演示了当网站使用简单的定制标记库正确编码动态内容时,可以消除大多数攻击。
Here, I'll explain how to create a custom tag for table display that is flexible enough to handle different HTML controls, such as href, checkbox, radio button, text field, and combo box.
我将介绍如何为表格显示创建自定义标记,让它有足够的灵活性以应付不同的HTML控件,如href、选择框、单选按钮、文本框和组合框。
This paper researches the key issues of data storage in paperless examination system, designs a custom tag-based data storage solutions, and it is applied to paperless examination system.
本文针对无纸化考试系统中数据存储这一关键问题进行研究,设计一种基于自定义标记的数据存储方案,并应用于无纸化考试系统。
In the "Insert Custom Tag" dialog, under Tag libraries in document, select /WEB-INF/struts-bean.tld .
在“InsertCustom Tag”对话框中,在文档中的 Tag库中选择 /WEB-INF/struts-bean.tld。
In the "Insert Custom Tag" dialog, under Tag libraries in document, select /WEB-INF/struts-bean.tld .
在“InsertCustom Tag”对话框中,在文档中的 Tag库中选择 /WEB-INF/struts-bean.tld。
应用推荐