Home >> All >> javax >> servlet >> jsp >> [ tagext Javadoc ] |
javax.servlet.jsp.tagext: Javadoc index of package javax.servlet.jsp.tagext.
Package Samples:
javax.servlet.jsp.tagext: Classes and interfaces for the Core JSP 2.0 API.
Classes:
VariableInfo: Information on the scripting variables that are created/modified by a tag (at run-time). This information is provided by TagExtraInfo classes and it is used by the translation phase of JSP. Scripting variables generated by a custom action have an associated scope of either AT_BEGIN, NESTED, or AT_END. The class name (VariableInfo.getClassName) in the returned objects is used to determine the types of the scripting variables. Note that because scripting variables are assigned their values from scoped attributes which cannot be of primitive types, "boxed" types such as java.lang.Integer ...
BodyTag: The BodyTag interface extends IterationTag by defining additional methods that let a tag handler manipulate the content of evaluating its body. It is the responsibility of the tag handler to manipulate the body content. For example the tag handler may take the body content, convert it into a String using the bodyContent.getString method and then use it. Or the tag handler may take the body content and write it out into its enclosing JspWriter using the bodyContent.writeOut method. A tag handler that implements BodyTag is treated as one that implements IterationTag, except that the doStartTag method ...
Tag: The interface of a classic tag handler that does not want to manipulate its body. The Tag interface defines the basic protocol between a Tag handler and JSP page implementation class. It defines the life cycle and the methods to be invoked at start and end tag. Properties The Tag interface specifies the setter and getter methods for the core pageContext and parent properties. The JSP page implementation object invokes setPageContext and setParent, in that order, before invoking doStartTag() or doEndTag(). Methods There are two main actions: doStartTag and doEndTag. Once all appropriate properties ...
TagLibraryValidator: Translation-time validator class for a JSP page. A validator operates on the XML view associated with the JSP page. The TLD file associates a TagLibraryValidator class and some init arguments with a tag library. The JSP container is reponsible for locating an appropriate instance of the appropriate subclass by new a fresh instance, or reuse an available one invoke the setInitParams(Map) method on the instance once initialized, the validate(String, String, PageData) method will be invoked, where the first two arguments are the prefix and uri for this tag library in the XML View. The prefix is intended ...
SimpleTag: Interface for defining Simple Tag Handlers. Simple Tag Handlers differ from Classic Tag Handlers in that instead of supporting doStartTag() and doEndTag() , the SimpleTag interface provides a simple doTag() method, which is called once and only once for any given tag invocation. All tag logic, iteration, body evaluations, etc. are to be performed in this single method. Thus, simple tag handlers have the equivalent power of BodyTag , but with a much simpler lifecycle and interface. To support body content, the setJspBody() method is provided. The container invokes the setJspBody() method with a ...
IterationTag: The IterationTag interface extends Tag by defining one additional method that controls the reevaluation of its body. A tag handler that implements IterationTag is treated as one that implements Tag regarding the doStartTag() and doEndTag() methods. IterationTag provides a new method: doAfterBody() . The doAfterBody() method is invoked after every body evaluation to control whether the body will be reevaluated or not. If doAfterBody() returns IterationTag.EVAL_BODY_AGAIN, then the body will be reevaluated. If doAfterBody() returns Tag.SKIP_BODY, then the body will be skipped and doEndTag() will ...
JspFragment: Encapsulates a portion of JSP code in an object that can be invoked as many times as needed. JSP Fragments are defined using JSP syntax as the body of a tag for an invocation to a SimpleTag handler, or as the body of a <jsp:attribute> standard action specifying the value of an attribute that is declared as a fragment, or to be of type JspFragment in the TLD. The definition of the JSP fragment must only contain template text and JSP action elements. In other words, it must not contain scriptlets or scriptlet expressions. At translation time, the container generates an implementation of the ...
TagExtraInfo: Optional class provided by the tag library author to describe additional translation-time information not described in the TLD. The TagExtraInfo class is mentioned in the Tag Library Descriptor file (TLD). This class can be used: to indicate that the tag defines scripting variables to perform translation-time validation of the tag attributes. It is the responsibility of the JSP translator that the initial value to be returned by calls to getTagInfo() corresponds to a TagInfo object for the tag being translated. If an explicit call to setTagInfo() is done, then the object passed will be returned ...
BodyContent: An encapsulation of the evaluation of the body of an action so it is available to a tag handler. BodyContent is a subclass of JspWriter. Note that the content of BodyContent is the result of evaluation, so it will not contain actions and the like, but the result of their invocation. BodyContent has methods to convert its contents into a String, to read its contents, and to clear the contents. The buffer size of a BodyContent object is unbounded. A BodyContent object cannot be in autoFlush mode. It is not possible to invoke flush on a BodyContent object, as there is no backing stream. Instances ...
ValidationMessage: A validation message from either TagLibraryValidator or TagExtraInfo. As of JSP 2.0, a JSP container must support a jsp:id attribute to provide higher quality validation errors. The container will track the JSP pages as passed to the container, and will assign to each element a unique "id", which is passed as the value of the jsp:id attribute. Each XML element in the XML view available will be extended with this attribute. The TagLibraryValidator can then use the attribute in one or more ValidationMessage objects. The container then, in turn, can use these values to provide more precise information ...
TryCatchFinally: The auxiliary interface of a Tag, IterationTag or BodyTag tag handler that wants additional hooks for managing resources. This interface provides two new methods: doCatch(Throwable) and doFinally(). The prototypical invocation is as follows: h = get a Tag(); // get a tag handler, perhaps from pool h.setPageContext(pc); // initialize as desired h.setParent(null); h.setFoo("foo"); // tag invocation protocol; see Tag.java try { doStartTag()... .... doEndTag()... } catch (Throwable t) { // react to exceptional condition h.doCatch(t); } finally { // restore data invariants and release per-invocation ...
TagAdapter: Wraps any SimpleTag and exposes it using a Tag interface. This is used to allow collaboration between classic Tag handlers and SimpleTag handlers. Because SimpleTag does not extend Tag, and because Tag.setParent() only accepts a Tag instance, a classic tag handler (one that implements Tag) cannot have a SimpleTag as its parent. To remedy this, a TagAdapter is created to wrap the SimpleTag parent, and the adapter is passed to setParent() instead. A classic Tag Handler can call getAdaptee() to retrieve the encapsulated SimpleTag instance.
DynamicAttributes: For a tag to declare that it accepts dynamic attributes, it must implement this interface. The entry for the tag in the Tag Library Descriptor must also be configured to indicate dynamic attributes are accepted. For any attribute that is not declared in the Tag Library Descriptor for this tag, instead of getting an error at translation time, the setDynamicAttribute() method is called, with the name and value of the attribute. It is the responsibility of the tag to remember the names and values of the dynamic attributes.
TagSupport: A base class for defining new tag handlers implementing Tag. The TagSupport class is a utility class intended to be used as the base class for new tag handlers. The TagSupport class implements the Tag and IterationTag interfaces and adds additional convenience methods including getter methods for the properties in Tag. TagSupport has one static method that is included to facilitate coordination among cooperating tags. Many tag handlers will extend TagSupport and only redefine a few methods.
BodyTagSupport: A base class for defining tag handlers implementing BodyTag. The BodyTagSupport class implements the BodyTag interface and adds additional convenience methods including getter methods for the bodyContent property and methods to get at the previous out JspWriter. Many tag handlers will extend BodyTagSupport and only redefine a few methods.
SimpleTagSupport: A base class for defining tag handlers implementing SimpleTag. The SimpleTagSupport class is a utility class intended to be used as the base class for new simple tag handlers. The SimpleTagSupport class implements the SimpleTag interface and adds additional convenience methods including getter methods for the properties in SimpleTag.
TagAttributeInfo: Information on the attributes of a Tag, available at translation time. This class is instantiated from the Tag Library Descriptor file (TLD). Only the information needed to generate code is included here. Other information like SCHEMA for validation belongs elsewhere.
TagVariableInfo: Variable information for a tag in a Tag Library; This class is instantiated from the Tag Library Descriptor file (TLD) and is available only at translation time. This object should be immutable. This information is only available in JSP 1.2 format TLDs or above.
TagData: The (translation-time only) attribute/value information for a tag instance. TagData is only used as an argument to the isValid, validate, and getVariableInfo methods of TagExtraInfo, which are invoked at translation time.
PageData: Translation-time information on a JSP page. The information corresponds to the XML view of the JSP page. Objects of this type are generated by the JSP translator, e.g. when being pased to a TagLibraryValidator instance.
TagLibraryInfo: Translation-time information associated with a taglib directive, and its underlying TLD file. Most of the information is directly from the TLD, except for the prefix and the uri values used in the taglib directive
TagFileInfo: Tag information for a tag file in a Tag Library; This class is instantiated from the Tag Library Descriptor file (TLD) and is available only at translation time.
FunctionInfo: Information for a function in a Tag Library. This class is instantiated from the Tag Library Descriptor file (TLD) and is available only at translation time.
TagInfo: Tag information for a tag in a Tag Library; This class is instantiated from the Tag Library Descriptor file (TLD) and is available only at translation time.
JspTag: Serves as a base class for Tag and SimpleTag. This is mostly for organizational and type-safety purposes.
Home | Contact Us | Privacy Policy | Terms of Service |