Interface JspIdConsumer
-
public interface JspIdConsumerThis interface indicates to the container that a tag handler wishes to be provided with a compiler generated ID.
The container sets the
jspIdattribute of the tag handler with an identification string, as part of tag property initialization. Each tag in a JSP page has a uniquejspId, and a given tag in a JSP page always has the samejspId, even for multiple requests to the page.Tag handler instances that implement
JspIdConsumercannot be reused.Even though the
jspIdattribute is similar in concept to thejsp:idattribute of an XML view (see Section JSP.10.1.13 of the spec), they are not related. Thejsp:idattribute is available only at translation time, and thejspIdattribute is available only at request time.The JSP container must provide a value for
jspIdthat 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 theCharacter.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
- It must start with a letter (as defined by the
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidsetJspId(String id)Called by the container generated code to set a value for the jspId attribute.
-
-
-
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.- Parameters:
id- The value to use for the jspId attribute
-
-