javax.servlet.jsp.tagext

Interface JspIdConsumer

  • All Known Implementing Classes:
    UIComponentBodyTag, UIComponentClassicTagBase, UIComponentELTag, UIComponentTag

    public interface JspIdConsumer

    This interface indicates to the container that a tag handler wishes to be provided with a compiler generated ID.

    The container sets the jspId attribute of the tag handler with an identification string, as part of tag property initialization. Each tag in a JSP page has a unique jspId, and a given tag in a JSP page always has the same jspId, even for multiple requests to the page.

    Tag handler instances that implement JspIdConsumer cannot be reused.

    Even though the jspId attribute is similar in concept to the jsp:id attribute of an XML view (see Section JSP.10.1.13 of the spec), they are not related. The jsp:id attribute is available only at translation time, and the jspId attribute is avalable only at request time.

    The JSP container must provide a value for jspId that conforms to the following rules:

    • It must start with a letter (as defined by the Character.isLetter() method) or underscore ('_').
    • Subsequent characters may be letters (as defined by the Character.isLetter() method), digits (as defined by the Character.isDigit() method), dashes ('-'), or underscores ('_')

    Note that the rules exclude colons ':' in a jspId, and that they are the same rules used for a component ID in JavaServer Faces.

    Since:
    JSP 2.1
    • Method Detail

      • setJspId

        void setJspId(String id)
        Called by the container generated code to set a value for the jspId attribute. An unique identification string, relative to this page, is generated at translation time.

Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/servlet/jsp/tagext/JspIdConsumer.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : https://docs.oracle.com/en/java/, Interface JspIdConsumer

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.