1z0-900

1z0-900 practice questions, page 2 of 6, with answer review and explanations.

Question 6

You have been asked to implement internationalization in your JSF web application. Where do you configure the supported locales?

  1. in the <f:view> tag of the Facelet page
  2. in the web.xml file
  3. in the faces-config.xml file
  4. in the src folder

Question 7

Given the code fragment: Which code can be added to register both of these methods to receive BankEvent notifications only if an instance of BankActivityService is already instantiated in the current context?

  1. @Observes(notifyObserver=IF_EXISTS) on line 3 and line 6
  2. @Observes(during=IN_PROGRESS) on line 1
  3. @Observes(during=AFTER_COMPLETION) on line 1
  4. @Observes(notifyObserver=IF_EXISTS) on line 4 and line 7 before method parameter declaration

Question 8

Which code snippet prints the exception error message as part of the page output?

  1. <%= exception.message %>
  2. <c:out value="${requestScope["˜javax.servlet.error.exception']}"/>
  3. <% exception.getMessage(); %>
  4. <% System.out.println(e.getMessage()) %>

Question 9

Java EE's support for WS-Security includes handling which two types of security credentials? (Choose two.)

  1. X.509 certificates
  2. SAML tokens
  3. OAuth Bearer tokens
  4. Two-factor authentication tokens

Question 10

Given the code fragment from a Facelet page: On Line 1, you ae asked to insert a search box that displays the text "Search Here" via a placeholder. Assume searchMB is a valid Managed Bean. Which two options enable you to create a search box with a placeholder attribute on Line 1? (Choose two.)

  1. <h:inputText value="#(searchMB.query)"> <f:param name="placeholder" value="Search Here"/> </h:inputText>
  2. <h:inputText value="#(searchMB.query)" placeholder="Search here"/>
  3. <input jsf:id="search" placeholder="Search here" jsf:value="# (searchMB.query)"></input>
  4. <h:inputText pt:placeholder="Search Here" value="#(searchMB.query)"/>
  5. <input id="search" jsf:placeholder="Search Here" value="$(searchMB.query)"></input>