1Z0-858 Exam Details

  • Exam Code
    :1Z0-858
  • Exam Name
    :Java Enterprise Edition 5 Web Component Developer Certified Professional
  • Certification
    :Oracle Certifications
  • Vendor
    :Oracle
  • Total Questions
    :276 Q&As
  • Last Updated
    :Jul 12, 2026

Oracle 1Z0-858 Online Questions & Answers

  • Question 211:

    Given:

    10.

    public void service(ServletRequest request,

    11.

    ServletResponse response) {

    12.

    ServletInputStream sis =

    13.

    // insert code here

    14.

    }

    Which retrieves the binary input stream on line 13?

    A. request.getWriter();
    B. request.getReader();
    C. request.getInputStream();
    D. request.getResourceAsStream();
    E. request.getResourceAsStream(ServletRequest.REQUEST);

  • Question 212:

    Given the definition of MyObject and that an instance of MyObject is bound as a session attribute:

    8.

    package com.example;

    9.

    public class MyObject implements

    10.

    javax.servlet.http.HttpSessionBindingListener {

    11.

    // class body code here

    12.

    }

    Which is true?

    A. Only a single instance of MyObject may exist within a session.
    B. The unbound method of the MyObject instance is called when the session to which it is bound times out.
    C. The com.example.MyObject must be declared as a servlet event listener in the web application deployment descriptor.
    D. The valueUnbound method of the MyObject instance is called when the session to which it is bound times out.

  • Question 213:

    Given:

    3.

    class MyServlet extends HttpServlet {

    4.

    public void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

    5.

    // servlet code here ...

    26.

    }

    27.

    }

    If the DD contains a single security constraint associated with MyServlet and its only tags and tags are:

    GET

    PUT

    Admin

    Which four requests would be allowed by the container? (Choose four.)

    A. A user whose role is Admin can perform a PUT.
    B. A user whose role is Admin can perform a GET.
    C. A user whose role is Admin can perform a POST.
    D. A user whose role is Member can perform a PUT.
    E. A user whose role is Member can perform a POST.
    F. A user whose role is Member can perform a GET.

  • Question 214:

    Click the Exhibit button.

    Assuming the tag library in the exhibit is imported with the prefix forum, which custom tag invocation produces a translation error in a JSP page?

    B. My message body.
    C. ${param.body}
    E. My message body.

  • Question 215:

    Which three are true about servlet filters? (Choose three.)

    A. A filter must implement the destroy method.
    B. A filter must implement the doFilter method.
    C. A servlet may have multiple filters associated with it.
    D. A servlet that is to have a filter applied to it must implement the javax.servlet.FilterChain interface.
    E. A filter that is part of a filter chain passes control to the next filter in the chain by invoking the FilterChain.forward method.
    F. For each element in the web application deployment descriptor, multiple instances of a filter may be created by the web container.

  • Question 216:

    A web application uses the HttpSession mechanism to determine if a user is "logged in." When a user supplies a valid user name and password, an HttpSession is created for that user.

    The user has access to the application for only 15 minutes after logging in. The code must determine how long the user has been logged in, and if this time is greater than 15 minutes, must destroy the HttpSession. Which method in HttpSession is used to accomplish this?

    A. getCreationTime
    B. invalidateAfter
    C. getLastAccessedTime
    D. getMaxInactiveInterval

  • Question 217:

    Which two about WAR files are true? (Choose two.)

    A. WAR files must be located in the web application library directory.
    B. WAR files must contain the web application deployment descriptor.
    C. WAR files must be created by using archive tools designed specifically for that purpose.
    D. The web container must serve the content of any META-INF directory located in a WAR file.
    E. The web container must allow access to resources in JARs in the web application library directory.

  • Question 218:

    Given the JSP code:

    <% request.setAttribute("foo", "bar"); %> and the Classic tag handler code:

    5.

    public int doStartTag() throws JspException {

    6.

    // insert code here

    7.

    // return int

    8.

    }

    Assume there are no other "foo" attributes in the web application.

    Which invocation on the pageContext object, inserted at line 6, assigns "bar" to the variable x?

    A. String x = (String) pageContext.getAttribute("foo");
    B. String x = (String) pageContext.getRequestScope("foo");
    C. It is NOT possible to access the pageContext object from within doStartTag.
    D. String x = (String)pageContext.getRequest().getAttribute("foo");
    E. String x = (String) pageContext.getAttribute("foo",PageContext.ANY_SCOPE);

  • Question 219:

    Which two are true about authentication? (Choose two.)

    A. Form-based logins should NOT be used with HTTPS.
    B. When using Basic Authentication the target server is NOT authenticated.
    C. J2EE compliant web containers are NOT required to support the HTTPS protocol.
    D. Web containers are required to support unauthenticated access to unprotected web resources.
    E. Form-based logins should NOT be used when sessions are maintained by cookies or SSL session information.

  • Question 220:

    For debugging purposes, you need to record how many times a given JSP is invoked before the user's session has been created. The JSP's destroy method stores this information to a database. Which JSP code snippet keeps track of this count for the lifetime of the JSP page?

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-858 exam preparations and Oracle certification application, do not hesitate to visit our Vcedump.com to find your solutions here.