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

    Given:

    3.

    public class MyTagHandler extends TagSupport {

    4.

    public int doStartTag() {

    5.

    // insert code here

    6.

    // return an int

    7.

    }

    8.

    // more code here ...

    18. }

    There is a single attribute foo in the session scope.

    Which three code fragments, inserted independently at line 5, return the value of the attribute? (Choose three.)

    A. Object o = pageContext.getAttribute("foo");
    B. Object o = pageContext.findAttribute("foo");
    C. Object o = pageContext.getAttribute("foo",PageContext.SESSION_SCOPE);
    D. HttpSession s = pageContext.getSession();Object o = s.getAttribute("foo");
    E. HttpServletRequest r = pageContext.getRequest();Object o = r.getAttribute("foo");

  • Question 242:

    You are building a web application that will be used throughout the European Union; therefore, it has significant internationalization requirements. You have been tasked to create a custom tag that generates a message using the

    java.text.MessageFormat class. The tag will take the resourceKey attribute and a variable number of argument attributes with the format, arg. Here is an example use of this tag and its output:

    generates:

    The disk "MyDisk" contains 1247 file(s).

    Which Simple tag class definition accomplishes this goal of handling a variable number of tag attributes?

    A. public class MessageTag extends SimpleTagSupportimplements VariableAttributes {private Map attributes = new HashMap();public void setVariableAttribute(String uri,String name, Object value) {this.attributes.put(name, value);}// more tag handler methods}
    B. The Simple tag model does NOT support a variable number of attributes.
    C. public class MessageTag extends SimpleTagSupportimplements DynamicAttributes {private Map attributes = new HashMap();public void putAttribute(String name, Object value) {this.attributes.put (name, value);}// more tag handler methods}
    D. public class MessageTag extends SimpleTagSupportimplements VariableAttributes {private Map attributes = new HashMap();public void putAttribute(String name, Object value) {this.attributes.put (name, value);}// more tag handler methods}
    E. public class MessageTag extends SimpleTagSupportimplements DynamicAttributes {private Map attributes = new HashMap();public void setDynamicAttribute(String uri, String name,Object value) {this.attributes.put(name, value);}// more tag handler methods}

  • Question 243:

    You are building JSP pages that have a set of menus that are visible based on a user's security role. These menus are hand-crafted by your web design team; for example, the SalesManager role has a menu in the file /WEB-INF/html/salesmgr-menu.html. Which JSP code snippet should be used to make this menu visible to the user?

  • Question 244:

    You need to store a Java long primitive attribute, called customerOID, into the session scope. Which two code snippets allow you to insert this value into the session? (Choose two.)

    A. long customerOID = 47L;session.setAttribute("customerOID", new Long(customerOID));
    B. long customerOID = 47L;session.setLongAttribute("customerOID", new Long(customerOID));
    C. long customerOID = 47L;session.setAttribute("customerOID", customerOID);
    D. long customerOID = 47L;session.setNumericAttribute("customerOID", new Long(customerOID));
    E. long customerOID = 47L;session.setLongAttribute("customerOID", customerOID);
    F. long customerOID = 47L;session.setNumericAttribute("customerOID", customerOID);

  • Question 245:

    A developer chooses to avoid using SingleThreadModel but wants to ensure that data is updated in a thread-safe manner. Which two can support this design goal? (Choose two.)

    A. Store the data in a local variable.
    B. Store the data in an instance variable.
    C. Store the data in the HttpSession object.
    D. Store the data in the ServletContext object.
    E. Store the data in the ServletRequest object.

  • Question 246:

    You have built a collection of custom tags for your web application. The TLD file is located in the file: / WEB-INF/myTags.xml. You refer to these tags in your JSPs using the symbolic name: myTags. Which deployment descriptor element must you use to make this link between the symbolic name and the TLD file name?

    A. myTags/WEB-INF/myTags.xml
    B. myTags/WEB-INF/myTags.xml
    C. myTags/WEB-INF/myTags.xml
    D. myTags/WEB-INF/myTags.xml

  • Question 247:

    A developer is designing a web application which extensively uses EJBs and JMS. The developer finds that there is a lot of duplicated code to build the JNDI contexts to access the beans and queues. Further, because of the complexity, there are numerous errors in the code. Which J2EE design pattern provides a solution for this problem?

    A. Command
    B. Transfer Object
    C. Service Locator
    D. Session Facade
    E. Business Delegate
    F. Data Access Object

  • Question 248:

    If you want to use the Java EE platform's built-in type of authentication that uses a custom HTML page for authentication, which two statements are true? (Choose two.)

    A. Your deployment descriptor will need to contain this tag:CUSTOM.
    B. The related custom HTML login page must be named loginPage.html.
    C. When you use this type of authentication, SSL is turned on automatically.
    D. You must have a tag in your deployment descriptor that allows you to point to both a login HTML page and an HTML page for handling any login errors.
    E. In the HTML related to authentication for this application, you must use predefined variable names for the variables that store the user and password values.

  • Question 249:

    Which two are characteristics of the Service Locator pattern? (Choose two.)

    A. It encapsulates component lookup procedures.
    B. It increases source code duplication and decreases reuse.
    C. It improves client performance by caching context and factory objects.
    D. It degrades network performance due to increased access to distributed lookup services.

  • Question 250:

    Click the Exhibit button. Given:

    11.

    <% com.example.Advisor advisor = new com.example.Advisor(); %>

    12.

    <% request.setAttribute("foo", advisor); %>

    Assuming there are no other "foo" attributes in the web application, which three are valid EL expressions for retrieving the advice property of advisor? (Choose three.)

    A. ${foo.advice}
    B. ${request.foo.advice}
    C. ${requestScope.foo.advice}
    D. ${requestScope[foo[advice]]}
    E. ${requestScope["foo"]["advice"]}
    F. ${requestScope["foo"["advice"]]}

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.