The tag file defines two attributes: the name of the required field and an optional error message.
这个标记文件定义两个属性:必需字段的名称和一个可选错误消息。
The Web page shown in Listing 5 declares the df prefix for the JSP library containing the tag file.
清单5 中显示的Web页面为包含标记文件的JSP库声明df前缀。
The variable's name is obtained from the JSP context because it is passed to the tag file as a JSP attribute.
变量名称可以通过JSP上下文获取,因为它作为jsp属性传递到标记文件。
Then, a JSP variable named varAlias is created in the page scope of the tag file with jspContext.setAttribute().
然后,通过 jspContext.setAttribute()在标记文件的页面范围内创建一个名为 varAlias的JSP变量。
The tag file accepts five attributes: the element's name, the minimum and maximum lengths, and two optional error messages.
此标记文件接受5 个属性:元素名称、最小和最大长度,以及两个可选错误消息。
This code fragment can be reduced back to a single line by moving the JSTL code into a reusable tag file that outputs the element.
通过将JSTL代码移动到输出元素的可重用标记文件中,就可以将此代码片段缩减为一行。
You just use the <%@ attribute name="myAttr" deferredValue="true" %> directive in the tag file and the JSP container does the rest.
您只需在标记文件中使用 <%@attributename="myAttr"deferredValue="true" %>指令,其余的由JSP容器处理。
Depending on the value of the type attribute, the tag file executes different JSP fragments, which set the model property with the same name as the HTML element.
根据type属性的值的不同,标记文件执行不同的JSP代码片段,并设置与HTML元素同名的模型属性。
When changed, a JSP tag file is recompiled and reloaded by the application server without having to restart the application, which makes both development and testing much easier.
更改时,应用服务器会重新编译并加载一个JSP标记文件,而无需重新启动应用程序,这使开发和测试都变得非常简单。
When changed, a JSP tag file is recompiled and reloaded by the application server without having to restart the application, which makes both development and testing much easier.
更改时,应用服务器会重新编译并加载一个JSP标记文件,而无需重新启动应用程序,这使开发和测试都变得非常简单。
应用推荐