JSTL Quiz 2S2C Home « JSTL Quiz 2

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

JSTL Quiz 2

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

Question 1 : What is the default value of the type attribute for the <fmt:formatNumber> and <fmt:parseNumber> actions?
- The default value of the <code>type</code> attribute for the <code>fmt:formatNumber</code> and <code>fmt:parseNumber</code> actions is <code>number</code>.
Question 2 : When using the <fmt:formatNumber> action the numeric value to be formatted can be specified using the value attribute or when omitted read from where?
- When using the <code>fmt:formatNumber</code> action the numeric value to be formatted can be specified using the value attribute or when omitted can be read from the tag's body content.
Question 3 : What is the default value of the type attribute for the <fmt:formatDate> and <fmt:parseDate> actions?
- The default value of the <code>type</code> attribute for the <code>fmt:formatDate</code> and <code>fmt:parseDate</code> actions is <code>date</code>.
Question 4 : When using the <fmt:formatDate> action if the scope attribute is specfied which other attribute must also be specified?
- When using the <code>fmt:formatDate</code> action if the <code>scope</code> attribute is specfied we must also specify the <code>var</code> attribute.
Question 5 : How many time zone Ii8n actions are there?
- There are <code>2</code> time zone Ii8n actions, these being <code>fmt:timeZone</code> and <code>fmt:setTimeZone</code>.
Question 6 : How many Database tag library actions are there?
- The <code>Database</code> tag library consists of six actions.
Question 7 : What happens if a data source is not of the String or javax.servlet.jsp.jstl.sql.dataSource types?
- If a data source is not of the <code>String</code> or <code>javax.servlet.jsp.jstl.sql.dataSource</code> types an exception is thrown.
Question 8 : What happens if a query using the <sql:query> action produces no results?
- If a query using the <code>sql:query</code> action produces no results, an empty <code>Result</code> object is returned.
Question 9 : Which Database action allows us to safeguard database integrity?
- The <code>sql:transaction</code> action allows us to safeguard database integrity by allowing us to nest several update statements into a transaction.
Question 10 : Which symbol is used for parameter substitution?
- The <code>?</code> symbol is used for parameter substitution.
Question 11 : Which action is used for date parameterisation?
- The <code>sql:dateParam</code> action is used for date parameterisation.
Quiz Progress Bar Please select an answer

What's Next?

The next quiz is on sixth and seventh lessons of the JSTL section of the site.