JSTL Quiz 3S2C Home « JSTL Quiz 3

The questions in this quiz on JavaServer Pages Standard Tag Libraries are on the topics covered in the sixth and seventh lessons of the JSTL section of the site. The table below lists the lesson used for each quiz, a description of the lesson content and the quiz number and questions associated with that lesson.

Lesson Summary

Click on a lesson in the table to go to that lesson for a refresher on the topics for that quiz.

Click on a quiz in the table to go straight to the quiz for a particular lesson.

JSTL Lessons Description Quiz Info.
Lesson 2 - Core Tag libraryIn our first lesson on JSTL libraries we look at the Core tag library.Quiz1
11 questions
Lesson 3 - XML Tag libraryIn our second lesson on JSTL libraries we look at the XML tag library.
Lesson 4 - II8n Tag libraryIn our third lesson on JSTL tag libraries we look at the II8n tag library.Quiz2
11 questions
Lesson 5 - Database Tag libraryIn our fourth lesson on JSTL tag libraries we look at the Database tag library.
Lesson 6 - Functions Tag libraryIn our final lesson on JSTL tag libraries we look at the Functions tag library.This quiz.
10 questions
Lesson 7 - Creating Custom TagsIn this JSTL lesson we look at creating our own custom tags for when the functionality we need is not present in the JSTL tag libraries.
Lesson 8 - EL FunctionsIn this JSTL lesson we look at EL Functions.Quiz4
10 questions
Lesson 9 - Tag FilesIn our final lesson on JSTL we look at Tag Files.

JSTL Quiz 3

The quiz below tests your knowledge of the material learnt in the sixth and seventh lessons of the JSTL section of the site.

Question 1 : How many Function tag library actions are there?
- The <code>Function</code> tag library consists of sixteen actions.
Question 2 : All the Function tag actions only work on strings?
- The <code>fn:length</code> tag works on collections as well as strings.
Question 3 : What happens if the input to any of the Function tags is null?
- If the input to any of the <code>Function</code> tags is <code>null</code> tag the input is treated as an empty string.
Question 4 : When using the fn:substring function what happens if the beginIndex attribute is less than 0?
- When using the <code>fn:substring</code> function if the <code>beginIndex</code> attribute is less than 0, it is set to 0.
Question 5 : When using the fn:replace function what happens if the afterSubstring attribute is an empty string?
- When using the <code>fn:replace</code> function if the <code>afterSubstring</code> attribute is an empty string all occurrences of the <code>beforeSubstring</code> attribute are removed from the <code>inputString</code> attribute.
Question 6 : Which type serves as the base type for both classic and simple tags and is mainly used for organizational and type-safety purposes?
- The <code>JspTag</code> type serves as the base type for both classic and simple tags and is mainly used for organizational and type-safety purposes.
Question 7 : What is the last method called in the simple tag lifecycle?
- The last method called in the simple tag lifecycle is the <code>doTag()</code> method.
Question 8 : Where are custom tag handlers registered?
- Custom tag handlers are registered in the tag library descriptor.
Question 9 : When compiling a tag handler both the Servlet API and JSP API jars are required?
- When compiling a tag handler both the Servlet API and JSP API jars are required and so both must appear in the build path.
Question 10 : Which directive do we use that allows us to use custom tags within our JSP pages?
- The <code>taglib</code> directive allows us to use custom tags within our JSP pages.
Quiz Progress Bar Please select an answer

What's Next?

The next quiz is on the eight and ninth lessons of the JSTL section of the site.