Question 6 of 142
You have been asked to implement internationalization in your JSF web application.
Where do you configure the supported locales?
    Correct Answer: C

    To implement internationalization in a JSF web application, the configuration of supported locales is done in the faces-config.xml file. This file is part of the JSF standard for application configuration and allows developers to define various settings, including locale configurations. The tag can be used within Facelet pages to set the locale, but the configuration of supported locales is primarily designated in faces-config.xml.

Question 7 of 142
Given the code fragment:
Exam 1z0-900: Question 7 - Image 1
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?
    Correct Answer: D

    To register methods to receive notifications only if an instance of BankActivityService is already instantiated in the current context, you must use the @Observes annotation with the notifyObserver parameter set to IF_EXISTS before the method parameter declaration. This ensures that the methods are only invoked if the observer instance is already available. Therefore, the correct code is @Observes(notifyObserver=IF_EXISTS) on line 4 and line 7 before the method parameter declaration.

Question 8 of 142
Which code snippet prints the exception error message as part of the page output?
    Correct Answer: A

    To print the exception error message as part of the page output, you can use JSP expressions. The option '<%= exception.message %>' directly embeds the exception's message into the HTML content, making it suitable for displaying the message on the page. Other options like '' do not directly access the exception message, and '<% exception.getMessage(); %>' or '<% System.out.println(e.getMessage()) %>' are either incorrect syntax or would print to the system console instead of the page.

Question 9 of 142
Java EE's support for WS-Security includes handling which two types of security credentials? (Choose two.)
    Correct Answer: A, B

    Java EE's support for WS-Security includes handling X.509 certificates and SAML tokens. X.509 certificates are widely used digital certificates that help validate the identity of the parties involved and establish a secure communication channel. SAML (Security Assertion Markup Language) tokens are used for exchanging authentication and authorization data between security domains, commonly in a web-based environment. Both X.509 certificates and SAML tokens are standard security credentials supported by WS-Security in Java EE.

Question 10 of 142
Given the code fragment from a Facelet page:
Exam 1z0-900: Question 10 - Image 1
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.)
    Correct Answer: C, D

    To create a search box with a placeholder attribute in a JSF (JavaServer Faces) application, we need to ensure that the code properly adheres to the JSF syntax and specifications. Therefore, options C and D are correct. Option C uses the `jsf:id` attribute along with the placeholder and value attributes correctly. Option D utilizes the `pt:placeholder` attribute, which is part of the pass-through attributes in JSF 2.2 and later, and correctly binds the value to the managed bean. Other options either misuse JSF syntax or attributes.