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 181:

    You need to retrieve the username cookie from an HTTP request. If this cookie does NOT exist, then the c variable will be null. Which code snippet must be used to retrieve this cookie object?

    A. 10. Cookie c = request.getCookie("username");
    B. 10. Cookie c = null;11. for ( Iterator i = request.getCookies();12. i.hasNext(); ) {13. Cookie o = (Cookie)
    C. next();14. if ( o.getName().equals("username") ) {15. c = o;16. break;17. }18. }
    D. 10. Cookie c = null;11. for ( Enumeration e = request.getCookies();12. e.hasMoreElements(); ) {13.Cookie o = (Cookie) e.nextElement();14. if ( o.getName().equals("username") ) {15. c = o;16.break;17. }18. }
    E. 10. Cookie c = null;11. Cookie[] cookies = request.getCookies();12. for ( int i = 0; i < cookies.length; i++ ) {13. if ( cookies[i].getName().equals("username") ) {14. c = cookies[i];15. break;16. }17. }

  • Question 182:

    Given:

    11.

    <% java.util.Map map = new java.util.HashMap();

    12.

    request.setAttribute("map", map);

    13.

    map.put("a", "true");

    14.

    map.put("b", "false");

    15.

    map.put("c", "42"); %>

    Which three EL expressions are valid and evaluate to true? (Choose three.)

    A. ${not map.c}
    B. ${map.d or map.a}
    C. ${map.a and map.d}
    D. ${map.false or map.true}
    E. ${map.a and map.b or map.a}
    F. ${map['true'] or map['false']}

  • Question 183:

    Given:

    6.

    7.

    <%="processing" %>

    8.

    and a custom tag handler for foo which extends TagSupport.

    Which two are true about the tag handler referenced by foo? (Choose two.)

    A. The doStartTag method is called once.
    B. The doAfterBody method is NOT called.
    C. The EVAL_PAGE constant is a valid return value for the doEndTag method.
    D. The SKIP_PAGE constant is a valid return value for the doStartTag method.
    E. The EVAL_BODY_BUFFERED constant is a valid return value for the doStartTag method.

  • Question 184:

    Which three are valid URL mappings to a servlet in a web deployment descriptor? (Choose three.)

    A. */*
    B. *.do
    C. MyServlet
    D. /MyServlet
    E. /MyServlet/*
    F. MyServlet/*.jsp

  • Question 185:

    Given: http://com.example/myServlet.jsp?num=oneandnum=twoandnum=three Which two produce the output "one, two and three"? (Choose two.)

    A. ${param.num[0],[1] and [2]}
    B. ${paramValues[0],[1] and [2]}
    C. ${param.num[0]}, ${param.num[1]} and ${param.num[2]}
    D. ${paramValues.num[0]}, ${paramValues.num[1]} and ${paramValues.num[2]}
    E. ${paramValues["num"][0]}, ${paramValues["num"][1]} and ${paramValues["num"][2]}
    F. ${parameterValues.num[0]}, ${parameterValues.num[1]} and ${parameterValues.num[2]}
    G. ${parameterValues["num"]["0"]}, ${parameterValues["num"]["1"]} and $ {parameterValues["num"]["2"]}

  • Question 186:

    Click the Exhibit button.

    The Appliance class is a Singleton that loads a set of properties into a Map from an external data source.

    Assume:

    An instance of the Appliance class exists in the application-scoped attribute, appl The appliance object includes the name property that maps to the value Cobia The request-scoped attribute, prop, has the value name.

    Which two EL code snippets will display the string Cobia? (Choose two.)

    A. ${appl.properties.name}
    B. ${appl.properties.prop}
    C. ${appl.properties[prop]}
    D. ${appl.properties[name]}
    E. ${appl.getProperties().get(prop)}
    F. ${appl.getProperties().get('name')}

  • Question 187:

    Which mechanism requires the client to provide its public key certificate?

    A. HTTP Basic Authentication
    B. Form Based Authentication
    C. HTTP Digest Authentication
    D. HTTPS Client Authentication

  • Question 188:

    Your web application uses a simple architecture in which servlets handle requests and then forward to a JSP using a request dispatcher. You need to pass information calculated in the servlet to the JSP for view generation. This information must NOT be accessible to any other servlet, JSP or session in the webapp. Which two techniques can you use to accomplish this goal? (Choose two.)

    A. Add attributes to the session object.
    B. Add attributes on the request object.
    C. Add parameters to the request object.
    D. Use the pageContext object to add request attributes.
    E. Add parameters to the JSP's URL when generating the request dispatcher.

  • Question 189:

    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 190:

    Given this fragment from a Java EE deployment descriptor:

    341.

    342.

    java.lang.Throwable 343. /mainError.jsp 344.

    345.

    346.

    java.lang.ClassCastException 347. /castError.jsp

    348.

    If the web application associated with the fragment above throws a ClassCastException. Which statement is true?

    A. The deployment descriptor is invalid.
    B. The container invokes mainError.jsp.
    C. The container invokes castError.jsp.
    D. Neither mainError.jsp nor castError.jsp is invoked.

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.