1Z0-899 Exam Details

  • Exam Code
    :1Z0-899
  • Exam Name
    :Java EE 6 Web Component Developer Certified Expert
  • Certification
    :Oracle Certifications
  • Vendor
    :Oracle
  • Total Questions
    :108 Q&As
  • Last Updated
    :Dec 07, 2021

Oracle 1Z0-899 Online Questions & Answers

  • Question 21:

    Given an HttpServletRequestrequest and HttpResponseresponse, which sets a cookie "username" with the value "joe" in a servlet?

    A. request.addCookie("username", "joe")
    B. request.setCookie("username", "joe")
    C. response.addCookie("username", "joe")
    D. request.addHeader(new Cookie("username", "joe"))
    E. request.addCookie(new Cookie("username", "joe"))
    F. response.addCookie(new Cookie("username", "joe"))
    G. response.addHeader(new Cookie("username", "joe"))

  • Question 22:

    For which three events can web application event listeners be registered? (Choose three.)

    A. when a session is created
    B. after a servlet is destroyed
    C. when a session has timed out
    D. when a cookie has been created
    E. when a servlet has forwarded a request
    F. when a session attribute value is changed

  • Question 23:

    A web application for business expense reporting allows uploading expense receipts. Multiple receipts can be uploaded single step using one HTTP request. The servlet that processes the request has been marked with the @MultipartConfig annotation. Which method should the servlet use to access the uploaded files?

    A. HttpServletRequest.getParts()
    B. HttpServletRequest.getData()
    C. servletRequest.getParts()
    D. servletRequest.getAllParts()

  • Question 24:

    Given this fragment in a servlet:

    23.

    if(reg.isUserInRole("Admin")) {

    24.

    // do stuff

    25.

    }

    And the following fragment from the related Java EE deployment descriptor:

    812.

    813.

    Admin

    814.

    Administrator

    815.

    900.

    901.

    Admin

    902.

    Administrator

    903.

    What is the result?

    A. Line 24 can never be reached.
    B. The deployment descriptor is NOT valid.
    C. If line 24 executes, the user's role will be Admin.
    D. If line 24 executes, the user's role will be Administrator.
    E. If line 24 executes, the user's role will NOT be predictable.

  • Question 25:

    When using Servlet asynchronous API if you want to dispatch the request back to a particular url -"/url" within the same Servlet Context which of the following API would you use?

    A. ASyncContext.dispatch();
    B. AsyncContext.dispatch("/url");
    C. AsyncContext.dispatch(servletContext, "/url");
    D. AsyncContext.start(runnable);
    E. RequestDispatcher.fotward("/url");
    F. RequestDispatcher.forward(servletContext, "/url");
    G. RequestDispatcher.include("/url");

  • Question 26:

    Your web application requires the ability to load and remove web files dynamically to the web container's file system? Which two HTTP methods are used to perform these actions? (Choose two)

    A. PUT
    B. POST
    C. SEND
    D. DELETE
    E. REMOVE
    F. DESTROY

  • Question 27:

    Which java code snippet checks whether the user is of the role "MANAGER" for a given HttpServRequest, httpServletRequest?

    A. httpServletRequest.isUserInRole("MANAGER");
    B. httpServletRequest.isCallerInRole("MANAGER");
    C. httpServletRequest.isPrincipalInRole("MANAGER");
    D. httpServletRequest.isAuthnticatedUserInRole("MANAGER");

  • Question 28:

    Users of your web application have requested that they should be able to set the duration of their sessions. So for example, one user might want a webapp to stay connected for an hour rather than the webapp's default of fifteen minutes; another user might want to stay connected for a whole day.

    Furthermore, you have a special login servlet that performs user authentication and retrieves the object from the database. You want to augment this code to set up the user's specified session duration.

    Which code snippet in the login servlet will accomplish this goal?

    A. User user = / / retrieves the user objects object from the database session.setDurationInterval (user.getSessionDuration());
    B. User user = / / retrieves the User objects from the database session.setInactiveInterval (user.getSessionDuration());
    C. User user = / / retrieves the user objects object from the database session.setInactiveInterval (user.get.SessionDuration());
    D. User user = / / retrieves the user objects object from the database session.setDuration (user.getSessionDuration());
    E. User user = / / retrieves the user objects object from the database session.setMaxInactiveInterval (user.getSessionDuration());
    F. User user = / / retrieves the user objects object from the database session.setMaxDurationInterval (user.getSessionDuration());

  • Question 29:

    You are working on a JSP that is intended to inform users about critical errors in the system. The JSP code is attempting to access the exception that represents the cause of the problem, but your IDE is telling you that the variable does not exist. What should you do to address this problem?

    A. Add a page directive stating that this page is an error handler
    B. Add scriptlet code to create a variable that refer to the exception
    C. Add a
    D. Perform the error handling in a servlet rather than in the JSP
    E. Edit the page that caused the error to ensure that it specifies this page as its error handler

  • Question 30:

    Which two are true about the JSTL core iteration custom tags? (Choose two.)

    A. It may iterate over arrays, collections, maps, and strings.
    B. The body of the tag may contain EL code, but not scripting code.
    C. When looping over collections, a loop status object may be used in the tag body.
    D. It may iterate over map, but only the key of the mapping may be used in the tag body.
    E. When looping over integers (for example begin= `1' end= `10'), a loop status object may not be used in the tag body.

Tips on How to Prepare for the Exams

Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Oracle exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 1Z0-899 exam preparations and Oracle certification application, do not hesitate to visit our Vcedump.com to find your solutions here.