31 JavaServer™ Faces Web Apps: Part 2
31.1 Introduction
No questions.
31.2 Accessing Databases in Web Applications
No questions.
31.2.1 Setting Up the Database
31.2.1 Q1: Which of the following is true?
a. You should maintain a separate database connection for each client request.
b. You should use a connection pool that allows the server to manage a limited
number of database connections and share them among requests.
c. You should never connect to databases from web apps.
d. None of the above.
31.2.2 Class AddressBean
31.2.2 Q1: The ________ annotation allows you to inject a DataSource into a managed
bean.
a. @Resource.
b. @DataSource.
c. @DataSourceDefinition.
d. None of the above.
31.2.3 index.xhtml Facelets Page
31.2.3 Q1: The ________ element displays a collection’s data in tabular format.
a. h:table.
b. h:collection.
c. h:dataTable.
d. None of the above.
31.2.4 addentry.xhtml Facelets Page
No questions.
31.3 Ajax
31.3 Q1: Ajax separates the user interaction portion of an application from its server
interaction, enabling both to proceed ________.
a. synchronously.
b. asynchronously in parallel.
c. without any interaction whatsoever.
d. None of the above.