JSTL Core Library Features for JSP

JSTL Core Library Features for JSP

Question

Which two features are provided by the JSTL Core library for a JSP? (Choose two.)

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

AD.

https://www.journaldev.com/2090/jstl-tutorial-jstl-tags-example

The JavaServer Pages Standard Tag Library (JSTL) Core library provides a set of custom tags for use in JSP pages. Two features provided by this library are:

A. Iteration over a collection: The JSTL Core library provides the <c:forEach> tag to iterate over a collection of items. This tag allows developers to easily loop through collections, such as arrays, Lists, Maps, or Sets, and display the values in the JSP page. It simplifies the coding effort, reducing the amount of code that needs to be written, making it easier to maintain and debug.

B. Testing conditions: The JSTL Core library provides conditional tags, such as <c:if> and <c:choose>, which allows developers to test conditions and control the flow of execution in JSP pages. These tags simplify the logic required for conditional statements, improving the readability of the code.

C. Buffering of large result sets: This feature is not provided by the JSTL Core library. Instead, buffering of large result sets is typically handled by the JSP container or web server, which manages the memory and performance of the application.

D. Message localization: The JSTL Formatting library provides tags for message localization, such as fmt:message and fmt:setBundle. These tags allow developers to internationalize their web applications, providing support for different languages and regions. However, this feature is not provided by the JSTL Core library.

In conclusion, options A and C are not correct as buffering of large result sets is not a feature provided by the JSTL Core library, while iteration over a collection and testing conditions are two of the main features of this library. Option D is also incorrect as message localization is a feature of the JSTL Formatting library, not the JSTL Core library.