Exam Details

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

Oracle Others Oracle Certifications 1Z0-858 Questions & Answers

  • Question 1:

    A web application allows the HTML title banner to be set using a servlet context initialization parameter called titleStr. Which two properly set the title in this scenario? (Choose two.)

    A. ${titleStr}

    B. ${initParam.titleStr}

    C. ${params[0].titleStr}

    D. ${paramValues.titleStr}

    E. ${initParam['titleStr']}

    F. ${servletParams.titleStr}

    G. ${request.get("titleStr")}

  • Question 2:

    You are building a dating service web site. Part of the form to submit a client's profile is a group of radio buttons for the person's hobbies:

    20.

    Hiking

    21.

    Skiing

    22.

    SCUBA Diving

    23.

    After the user submits this form, a confirmation screen is displayed with these hobbies listed. Assume that an application-scoped variable, hobbies, holds a map between the Hobby enumerated type and the display name.

    Which EL code snippet will display Nth element of the user's selected hobbies?

    A. ${hobbies[hobbyEnum[N]}

    B. ${hobbies[paramValues.hobbyEnum[N]]}

    C. ${hobbies[paramValues@'hobbyEnum'@N]}

    D. ${hobbies.get(paramValues.hobbyEnum[N])}

    E. ${hobbies[paramValues.hobbyEnum.get(N)]}

  • Question 3:

    Given a web application in which the request parameter productID contains a product identifier. Which two EL expressions evaluate the value of the productID? (Choose two.)

    A. ${productID}

    B. ${param.productID}

    C. ${params.productID}

    D. ${params.productID[1]}

    E. ${paramValues.productID}

    F. ${paramValues.productID[0]}

    G. ${pageContext.request.productID}

  • Question 4:

    You are building a web application with a scheduling component. On the JSP, you need to show the current date, the date of the previous week, and the date of the next week. To help you present this information, you have created the following EL functions in the 'd' namespace:

    name: curDate; signature: java.util.Date currentDate() name: addWeek; signature: java.util.Date addWeek (java.util.Date, int) name: dateString; signature: java.util.String getDateString(java.util.Date)

    Which EL code snippet will generate the string for the previous week?

    A. ${d:dateString(addWeek(curDate(), -1))}

    B. ${d:dateString[addWeek[curDate[], -1]]}

    C. ${d:dateString[d:addWeek[d:curDate[], -1]]}

    D. ${d:dateString(d:addWeek(d:curDate(), -1))}

  • Question 5:

    You are building a dating web site. The client's date of birth is collected along with lots of other information. The Person class has a derived method, getAge():int, which returns the person's age calculated from the date of birth and today's date. In one of your JSPs you need to print a special message to clients within the age group of 25 through 35. Which two EL code snippets will return true for this condition? (Choose two.)

    A. ${client.age in [25,35]}

    B. ${client.age between [25,35]}

    C. ${client.age between 25 and 35}

    D. ${client.age <= 35 andand client.age >= 25}

    E. ${client.age le 35 and client.age ge 25}

    F. ${not client.age > 35 andand client.age < 25}

  • Question 6:

    You are creating a servlet that generates stock market graphs. You want to provide the web browser with precise information about the amount of data being sent in the response stream. Which two HttpServletResponse methods will you use to provide this information? (Choose two.)

    A. response.setLength(numberOfBytes);

    B. response.setContentLength(numberOfBytes);

    C. response.setHeader("Length", numberOfBytes);

    D. response.setIntHeader("Length", numberOfBytes);

    E. response.setHeader("Content-Length", numberOfBytes);

    F. response.setIntHeader("Content-Length", numberOfBytes);

  • Question 7:

    Which two prevent a servlet from handling requests? (Choose two.)

    A. The servlet's init method returns a non-zero status.

    B. The servlet's init method throws a ServletException.

    C. The servlet's init method sets the ServletResponse's content length to 0.

    D. The servlet's init method sets the ServletResponse's content type to null.

    E. The servlet's init method does NOT return within a time period defined by the servlet container.

  • Question 8:

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

    Which is true about the web container request processing model?

    A. The init method on a filter is called the first time a servlet mapped to that filter is invoked.

    B. A filter defined for a servlet must always forward control to the next resource in the filter chain.

    C. Filters associated with a named servlet are applied in the order they appear in the web application deployment descriptor file.

    D. If the init method on a filter throws an UnavailableException, then the container will make no further attempt to execute it.

  • Question 10:

    Your IT department is building a lightweight Front Controller servlet that invokes an application logic object with the interface:

    public interface ApplicationController { public String invoke(HttpServletRequest request) }

    The return value of this method indicates a symbolic name of the next view. From this name, the Front Controller servlet looks up the JSP URL in a configuration table. This URL might be an absolute path or a path relative to the current request. Next, the Front Controller servlet must send the request to this JSP to generate the view. Assume that the servlet variable request is assigned the current HttpServletRequest object and the variable context is assigned the webapp's ServletContext.

    Which code snippet of the Front Controller servlet accomplishes this goal?

    A. Dispatcher view= context.getDispatcher(viewURL);view.forwardRequest(request, response);

    B. Dispatcher view= request.getDispatcher(viewURL);view.forwardRequest(request, response);

    C. RequestDispatcher view= context.getRequestDispatcher(viewURL);view.forward(request, response);

    D. RequestDispatcher view= request.getRequestDispatcher(viewURL);view.forward(request, response);

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.