Which of the elements defined within the taglib element of taglib descriptor file are required. Select the two correct answers.

  1. tlib-version

  2. short-name

  3. uri

  4. display-name


Correct Option: A,B
Explanation:

To solve this question, the user needs to know the structure of the taglib descriptor file (also known as the TLD file) used in JavaServer Pages (JSP) applications.

The taglib element is used to define a tag library and contains several optional and required sub-elements. The question asks which of these sub-elements are required.

Now, let's go through each option and explain why it is right or wrong:

A. tlib-version: This sub-element specifies the version of the tag library descriptor file. It is an optional sub-element, not required.

B. short-name: This sub-element specifies a short name for the tag library. It is a required sub-element.

C. uri: This sub-element specifies the URI of the tag library and is used to identify the tag library in JSP pages. It is a required sub-element.

D. display-name: This sub-element specifies a display name for the tag library. It is an optional sub-element, not required.

Therefore, the correct answers are:

  • B. short-name
  • C. uri

The Answer is: B and C

Find more quizzes: