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

    Squeaky Beans Inc. hired an outside consultant to develop their web application. To finish the job quickly, the consultant created several dozen JSP pages that directly communicate with the database. The Squeaky business team has since purchased a set of business objects to model their system, and the Squeaky developer charged with maintaining the web application must now refactor all the JSPs to work with the new system. Which pattern can the developer use to solve this problem?

    A. Transfer Object
    B. Service Locator
    C. Intercepting Filter
    D. Business Delegate

  • Question 122:

    Given an HttpServletRequest request and an HttpServletResponse response:

    41.

    HttpSession session = null;

    42.

    // insert code here

    43.

    if(session == null) {

    44.

    // do something if session does not exist

    45.

    } else {

    46.

    // do something if session exists

    47.

    }

    To implement the design intent, which statement must be inserted at line 42?

    A. session = response.getSession();
    B. session = request.getSession();
    C. session = request.getSession(true);
    D. session = request.getSession(false);
    E. session = request.getSession("jsessionid");

  • Question 123:

    A developer wants a web application to be notified when the application is about to be shut down. Which two actions are necessary to accomplish this goal? (Choose two.)

    A. include a listener directive in a JSP page
    B. configure a listener in the TLD file using the element
    C. include a element in the web application deployment descriptor
    D. configure a listener in the application deployment descriptor, using the element
    E. include a class implementing ServletContextListener as part of the web application deployment
    F. include a class implementing ContextDestroyedListener as part of the web application deployment
    G. include a class implementing HttpSessionAttributeListener as part of the web application deployment

  • Question 124:

    You are creating a library of custom tags that mimic the HTML form tags. When the user submits a form that fails validation, the JSP form is forwarded back to the user. The tag must support the ability to re-populate the form field with the request parameters from the user's last request. For example, if the user entered "Samantha" in the text field called firstName, then the form is re- populated like this:

    Which tag handler method will accomplish this goal?

    A. public int doStartTag() throws JspException {JspContext ctx = getJspContext();String value = ctx.getParameter(this.name);if ( value == null ) value = "";JspWriter out = pageContext.getOut();try {out.write(String.format(INPUT, this.name, value));} (Exception e) { throw new JspException(e); } return SKIP_BODY;}private static String INPUT= "";
    B. public void doTag() throws JspException {JspContext ctx = getJspContext();String value = ctx.getParameter(this.name);if ( value == null ) value = "";JspWriter out = pageContext.getOut();try {out.write(String.format(INPUT, this.name, value));} (Exception e) { throw new JspException(e); }} private static String INPUT= "";
    C. public int doStartTag() throws JspException {ServletRequet request = pageContext.getRequest();String value = request.getParameter(this.name);if ( value == null ) value = "";JspWriter out = pageContext.getOut();try {out.write (String.format(INPUT, this.name, value));} (Exception e) { throw new JspException(e); }return SKIP_BODY;}private static String INPUT= "";
    D. public void doTag() throws JspException { ServletRequet request = pageContext.getRequest();String value = request.getParameter(this.name);if ( value == null ) value = "";JspWriter out = pageContext.getOut();try {out.write(String.format (INPUT, this.name, value));} (Exception e) { throw new JspException(e); }}private static String INPUT= "";

  • Question 125:

    Given the element from the web application deployment descriptor:

    /main/page1.jsp true

    and given that /main/page1.jsp contains:

    <% int i = 12; %> <%= i %>

    What is the result?

    B. 12
    C. The JSP fails to execute.

  • Question 126:

    Given the two security constraints in a deployment descriptor:

    101.

    102.

    103. SALES

    104.

    SALES

    105.

    106.

    107.

    108.

    109. 110.

    If the two security constraints have the same url-pattern and http-method, which two, inserted independently at line 109, will allow users with role names of either SALES or MARKETING to access this resource? (Choose two.)

    B. *
    C. ANY
    D. MARKETING

  • Question 127:

    Click the Exhibit button.

    Given the HTML form:

    1.

    2.

    3.

    4.

    Name:

    5.

    Price:

    6.

    7.

    8.

    9.

    Assume the product attribute does NOT yet exist in any scope.

    Which code snippet, in submit.jsp, instantiates an instance of com.example.Product that contains the results of the form submission?

    B. ${product.name = param.i1}$ {product.price = param.i2}

  • Question 128:

    Which element of the web application deployment descriptor defines the servlet class associated with a servlet instance?

  • Question 129:

    Every page of your web site must include a common set of navigation menus at the top of the page. This menu is static HTML and changes frequently, so you have decided to use JSP's static import mechanism. Which JSP code snippet accomplishes this goal?

  • Question 130:

    Click the Exhibit button.

    Assume the tag library in the exhibit is placed in a web application in the path /WEB- INF/tld/example.tld.

    1.

    2.

    Which JSP code, inserted at line 1, completes the JSP code to invoke the hello tag?

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.