MT Sample Questions Flashcards
The basic protocol that drives the web is:
HTTP
Java EE deployment descriptors are described and stored in what format?
XML (web.xml)
Determine how application is deployed
Which of the following is in JSF but not in JSP or Servlets:
- Navigation
- Session management
- Error handling
- Extensible tag mechanism
Navigation
The primary JSF configuration file is
faces-config.xml
Which CDI scope requires stored objects to be thread safe?
Session scope?
Yes, because multiple access for a single session (thread-safe means safe concurrent action)
Which CDI scope exists from the time an HTTP request is sent until the response is sent back to the client?
Request-scoped
Which JSF tag generates an HTTP GET request?A)h:commandButton
B)h:doGet
C)j:commandLink
D)h:link
E)h:command
h:link (navigates to a new page without form submission. Uses GET instead of POST)
NOTE: doGet doesn’t exist.
A JSF tag used to organize a page into a tabular format is
h:dataTable
(h:panelGrid incorrect because organizes page in a grid but does not create a “tabular” table.)
What JSF tag is used to add html around an HTML element?
A)ui:template
B)ui:decorate
C)ui:component
D)h:composition
E)ui:composition
ui:decorate
Adds your xHTML file/composition to existing HTML code by “decorating” it in.
Note: composition tag throws away everything outside of it.
What component is generated by h:dataTable?
A)UIData
B)UIDataTable
C)UITable
D)UIInput
E)Table
UIData
Selection criteria can be added to a n SQL query using which clause?A)WHERE
B)JOIN
C)LIKE
D)FROM
E)SELECT
SELECT or WHERE.
I assume WHERE because it determines specifically the selection criterias
Containers described in the Java EE specification include
A)Web application conta iner
B)Applet container
C)EJB application container
D)Application client container
E)All of the above
I assume all of the above because your java EE program is not always guaranteed to be a web app
One JSF predefined object (in the value expression language) which is not present in JSP Expression Language is
A)param
B)view
C)header
D)requestScope
E)cookie
view because JSF uses a component tree view whereas JSP just creates dynamic HTML.
In order for a JSF page to determine the next page to be displayed, it can use
A)next-page
B)from-outcome
C)to-view
D)from-view-id
E)from-action
from-view-id
It is not from-outcome because from-view-id is more foundational
For example, you can use implicit navigation without a from-outcome.
Which JSF HTML tag attribute is used to link its component with a backing bean property?A)value
B)binding
C)property
D)backing
E)id
value 100%