Java EE 7 Application Developer 1Z0-900 Free Questions V9.02 | Killtest

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Which class do you use to handle an incoming JSON Message as a stream? A. JsonReader B. JsonObjectBuilder C. JsonParser D. JsonObject

A. JsonReader

Which two approaches would result in the current date being added to the output of a JSP? (Choose two.) A. <%= out.printIn(new java.util.Date()) %> B. <% out.printIn(new java.util.Date()); %> C. <%= new java.util.Date() %> D. <% System.out.printIn(new java.util.Date()); %>

A. <%= out.printIn(new java.util.Date()) %> C. <%= new java.util.Date() %>

What is true about Message-Driven Beans (MDBs)? A. MDBs can participate in transactions. B. MDBs are invoked synchronously. C. Each MDBs can process messages only from a single client. D. MDBs retain data caches between client calls.

A. MDBs can participate in transactions.

Which type allows you to share servlet attributes across your entire web application? A. ServletContext B. HttpSession C. ServletRequest D. ServletConfig

A. ServletContext

Java EE's support for WS-Security includes handling which two types of security credentials? (Choose two.) A. X.509 certificates B. SAML tokens C. OAuth Bearer tokens D. Two-factor authentication tokens

A. X.509 certificates B. SAML tokens

You have been asked to implement internationalization in your JSF web application. Where do you configure the supported locales? A. in the <f:view>tag of the Facelet page B. in the web.xmlfile C. in the faces-config.xml file D. in the src folder

A. in the <f:view>tag of the Facelet page

How do you specify a default error page in your web.xml file? A. <on-error> <location>/general-error.html<location></on-error> B. <error-page><error-code>*</error-code><location>/general-error.html</location></error-page> C. <on-error> <error-code>*</error-code><location>/general-error.html</location></on-error> D. <error-page><location>/general-error.html</location></error-page>

B. <error-page><error-code>*</error-code><location>/general-error.html</location></error-page>

Which two capabilities are provided by the Java Authentication and Authorization Services (JAAS) API? (Choose two.) A. protecting data from unauthorized viewing by using encryption B. verifying that a user is allowed to perform an action C. ensuring that data is not modified in transit D. verifying identity claims from users

B. verifying that a user is allowed to perform an action C. ensuring that data is not modified in transit

When handling a JSF request, your application code decided to redirect the call to another URL by using HTTP redirect. Which action should you take to correctly complete the handling of the JSF life cycle? A. Set the immediate="true" attribute on the command button that was used to perform this call. B. Invoke the dispatch()method on the ExternalContextobject. C. Invoke the setCurrentPhaseId(RENDER_RESPONSE)method on the FacesContextobject. D. Invoke the responseComplete()method on the FacesContextobject.

C. Invoke the setCurrentPhaseId(RENDER_RESPONSE)method on the FacesContextobject.

You are working with JMS publish-subscribe operations. What happens when a producer publishes a message to a topic for which a durable subscription exists but there are no subscribers available? A. The publisher waits for a subscriber, who then consumes it. However, the publisher will time out if no consumer arrives within the given timeout period. B. The publisher sends the message. However, it is never consumed because there wasn't anything listening when it arrived, regardless of the message timeout length. C. The publisher successfully sends a message, which will be consumed later, once there is a subscriber, assuming the message hasn't timed out. D. The message publisher is immediately notified about the lack of subscribers and can decide for itself if, and when, to resend.

C. The publisher successfully sends a message, which will be consumed later, once there is a subscriber, assuming the message hasn't timed out.

You need to exchange large binary messages using chunks in a WebSocket application. Identify two ways in which you can receive partial messages. (Choose two.) A. Define an @OnMessage method with a single MimePart parameter. B. Use a ChunkListenerinterface implementation. C. Use a MessageHandler.Partial<ByteBuffer>interface implementation. D. Define an @OnMessage method with byte [] as the first parameter and a booleanas the second parameter.

C. Use a MessageHandler.Partial<ByteBuffer>interface implementation. D. Define an @OnMessage method with byte [] as the first parameter and a booleanas the second parameter.

Which code snippet prints the exception error message as part of the page output? A. <%= exception.message %> B. <c:out value="${requestScope['javax.servlet.error.exception']}"/> C. <% exception.getMessage(); %> D. <% System.out.println(e.getMessage()) %>

D. <% System.out.println(e.getMessage()) %>

Which URL represents an invalid approach to pass a parameter to a REST resource? A. <base-url>/Employees?value=1 B. <base-url>/Employees&value=1 C. <base-url>/Employees/1 D. <base-url>/Employees;value=1

D. <base-url>/Employees;value=1

You need to develop a chat application, which allows the display of emoticons and images together with text messages. How should you configure a WebSocket endpoints to receive both text and binary messages? A. Create two @onMessagemethods in the same endpoint with appropriate parameter types. B. Define the @onMessage methods in your endpoint with Object as parameter and check the actual type in your code. C. You can achieve this only by creating separate WebSocket endpoints for each message type. D. Create two @onMessagemethods, each with appropriate decoder attribute in the same endpoint.

D. Create two @onMessagemethods, each with appropriate decoder attribute in the same endpoint.

Which interface should you implement if you want to be alerted to the lifecycle events surrounding your task being executed by a ManagedExecutorService? A. the RunnableInterface B. the ManagedExecutorTaskinterface C. the TaskEventListenerinterface D. the ManagedTaskListenerinterface

D. the ManagedTaskListenerinterface


Ensembles d'études connexes

Chapter 70. Emergency, Trauma, and Environmental Injuries

View Set

Psycholgoy-Chapter 20-Attitudes and Social Influence

View Set

Environmental Systems and Societies | Chapter 1

View Set

Nursing 403: Chapter 45: Management of Patients With Oral and Esophageal Disorders Prep U

View Set

1.b. Fair Labor Standard Act (FLSA)

View Set

LabCE Blood Bank Incorrect Questions

View Set

Managerial Chapter 6- Short-Term Decision Making

View Set