Download Oracle.1z0-900.TestKing.2019-07-22.71q.vcex

Download Exam

File Info

Exam Java EE 7 Application Developer
Number 1z0-900
File Name Oracle.1z0-900.TestKing.2019-07-22.71q.vcex
Size 286 KB
Posted Jul 22, 2019
Download Oracle.1z0-900.TestKing.2019-07-22.71q.vcex

How to open VCEX & EXAM Files?

Files with VCEX & EXAM extensions can be opened by ProfExam Simulator.

Purchase

Coupon: MASTEREXAM
With discount: 20%






Demo Questions

Question 1

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
Correct answer: A
Explanation:
Reference https://docs.oracle.com/javaee/7/tutorial/cdi-adv005.htm
Reference https://docs.oracle.com/javaee/7/tutorial/cdi-adv005.htm



Question 2

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()) %>
Correct answer: D
Explanation:
Reference: https://www.geeksforgeeks.org/3-different-ways-print-exception-messages-java/
Reference: https://www.geeksforgeeks.org/3-different-ways-print-exception-messages-java/



Question 3

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
Correct answer: AB



Question 4

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>
Correct answer: CE



Question 5

Given the code fragment:
  
Which method should be used on line 3 to enable default validation mechanism? 


  1. u.setProperty(String, Object)
  2. u.setProperty(Schema)
  3. u.setEventHandler(ValidationEventHandler)
  4. u.setAdapter(XmlAdapter)
Correct answer: D
Explanation:
Reference: https://docs.oracle.com/javaee/6/api/javax/xml/bind/Unmarshaller.html
Reference: https://docs.oracle.com/javaee/6/api/javax/xml/bind/Unmarshaller.html



Question 6

How do you specify a default error page in your web.xml file? 


  1. <on-error>
    <location>/general-error.html<location> 
    </on-error> 
  2. <error-page>
    <error-code>*</error-code> 
    <location>/general-error.html</location> 
    </error-page> 
  3. <on-error>
    <error-code>*</error-code> 
    <location>/general-error.html</location> 
    </on-error> 
  4. <error-page>
    <location>/general-error.html</location> 
    </error-page> 
Correct answer: B
Explanation:
Reference: http://www.codejava.net/java-ee/servlet/how-to-handle-error-in-web-xml-for-java-web-applications
Reference: http://www.codejava.net/java-ee/servlet/how-to-handle-error-in-web-xml-for-java-web-applications



Question 7

Given the code fragment:
  
And 
  
Which two steps, when performed independently, enable the index.xhtml page to print the following text: The Id is 12345? (Choose two.)


  1. Replace line 2 with: @Inject public void setAcc(Account acc)
  2. Replace line 3 with: @Inject public Account getAcc()
  3. Replace line 1 with: @Inject private Account acc;
  4. Replace line 3 with: public @Inject Account getAcc()
  5. Replace line 1 with: private @Inject Account acc;
  6. Replace line 2 with: public void setAcc(@Inject Account acc)
Correct answer: DF



Question 8

Given the code fragments:
  
What code should you add to the body of the updateEmployee method in order to save pending changes to the database? 


  1. entityManager.merge(emp);
  2. Context. Ctx = new InitialContext();
    UserTransaction utx = (UserTransaction)ctx.lookup(“java:comp/UserTransaction”);
    utx.begin();
    entityManager.merge(emp);
    utx.commit();
  3. entityManager.lock(emp);
    EntityManager.merge(emp);
  4. entityManager.getTransaction().begin();
    entityManager.merge(emp);
    entityManager.getTransaction().commit();
Correct answer: B



Question 9

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?


  1. Set the immediate=“true” attribute on the command button that was used to perform this call.
  2. Invoke the dispatch() method on the ExternalContext object.
  3. Invoke the setCurrentPhaseId(RENDER_RESPONSE) method on the FacesContext object.
  4. Invoke the responseComplete() method on the FacesContext object.
Correct answer: C



Question 10

Given the code fragment:
  
When the context root is requested http://host:port/context, how does the container resolve this mapping?


  1. thirdServlet handles the request.
  2. firstServlet handles the request.
  3. The container throws an error at startup.
  4. secondServlet handles the request.
Correct answer: C









CONNECT US

Facebook

Twitter

PROFEXAM WITH A 20% DISCOUNT

You can buy ProfExam with a 20% discount!



HOW TO OPEN VCEX FILES

Use ProfExam Simulator to open VCEX files