JSTL Quiz 4S2C Home « JSTL Quiz 4

The questions in this quiz on JavaServer Pages Standard Tag Libraries are on the topics covered in the eight and ninth 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.Quiz3
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.This quiz
10 questions
Lesson 9 - Tag FilesIn our final lesson on JSTL we look at Tag Files.

JSTL Quiz 4

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

Question 1 : We can use the same TLD file for custom tags and EL functions?
- We can use the same TLD file for custom tags and EL functions as long as each entity has a unique name.
Question 2 : EL functions use public instance methods?
- EL functions use public static methods.
Question 3 : We need to include the Servlet and JSP API JARs in our build path when compiling EL functions?
- We do not need to include the Servlet and JSP API JARs in our build path when compiling EL functions as we just use standard Java classes.
Question 4 : We can use methods from existing classes for EL functions?
- We can use methods from existing classes for EL functions as long as the methods have the <code>public static</code> access modifiers.
Question 5 : Which directive do we use that allows us to use EL functions within our JSP pages?
- The <code>taglib</code> directive allows us to use EL functions within our JSP pages.
Question 6 : With tag files you have to precompile tag handlers just like you do with custom tags?
- With tag files there is no need to precompile tag handlers as you have to with custom tags.
Question 7 : Which of these directives isn't used in tag files?
- The <code>page</code> directive is used in JSP pages, in tag files we use the <code>tag</code> directive instead.
Question 8 : Deployed tag files can be located by the container within WEB-INF/tags or a subdiretory there of, can we place tag files anywhere else?
- Deployed tag files can also be located by the container within the <code>META-INF/tags</code> directory inside a JAR file that's inside the <code>WEB-INF/lib</code> folder or inside a sub-directory of the <code>META-INF/tags</code> directory that's inside a JAR file that's inside the <code>WEB-INF/lib</code> folder.
Question 9 : When we want to use a tag file within our JSP pages what directive do we use to point to the location of the tag file?
- When we want to use a tag file within our JSP pages we use the <code>taglib</code> directive to point to the location of the tag file.
Question 10 : Can tag files include other sources?
- . Just like JSP pages tag files can also include other resources and these files have the <code>tagf</code> extension.
Quiz Progress Bar Please select an answer

What's Next?

That's it for the JSTL quizzes, next up are the HTML Basics Quizzes.