ignored. 14.4.7 The getAsString Tag The getAsString tag

ignored. 14.4.7 The getAsString Tag The getAsString tag retrieves the value of the specified tile attribute property and renders it to the current JspWriter as a String. The usual toString( ) conversion is applied to the value. If the named value is not found, a JSPException will be thrown. Table 14-8 lists the attributes for the getAsString tag. Table 14-8. Attributes for the getAsString tag Attribute name Description ignore If this attribute is set to true and the attribute specified by the name does not exist, simply return without writing anything. The default value is false, which will cause a runtime exception to be thrown. name The attribute name. This attribute is required. role If the user is in the specified role, the tag is taken into account; otherwise, the tag is ignored. 14.4.8 The useAttribute Tag The useAttribute tag declares a Java variable and an attribute in the specified scope, using the tile’s attribute value. The variable and attribute will have the name specified by id, or the original name if not specified. Table 14-9 lists the attributes for the useAttribute tag. Table 14-9. Attributes for the useAttribute tag Attribute name Description classname The class of the declared variable. id The declared attribute and variable name. ignore If this attribute is set to true and the attribute specified by the name does not exist, simply return without error. The default value is false, which will cause a runtime exception to be thrown. name The tile’s attribute name. This attribute is required. scope The scope of the declared attribute. Defaults to “page”. 14.4.9 The importAttribute Tag The importAttribute tag imports the attribute from the tile to the requested scope. The name and scope attributes are optional. If not specified, all tile attributes are imported in page scope. Once imported, an attribute can be used like any other bean from the JSP context. Table 14-10 lists the attributes for the importAttribute tag.
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

Leave a Reply