nerdexam
Oracle

1Z0-899 · Question #47

Refer to the Exhibit. A servlet sets a session-scoped attribute product with an instance of com.example.product an forward to a JSP. Which two output the name of the product in the response? (Choose…

The correct answer is B. <jsp:useBean id="product" class="com.example.Product" /> <%= C. <jsp:useBean id="com.example.Product" scope="page">. See the full explanation below for the reasoning.

Question

Refer to the Exhibit. A servlet sets a session-scoped attribute product with an instance of com.example.product an forward to a JSP. Which two output the name of the product in the response? (Choose two)

Exhibit

1Z0-899 question #47 exhibit

Options

  • A<%= product.getName() %>
  • B<jsp:useBean id="product" class="com.example.Product" /> <%=
  • C<jsp:useBean id="com.example.Product" scope="page">
  • D<jsp:useBean id="product" type="com.example.Product"
  • E<jsp:useBean id="product" type="com.example.Product">

How the community answered

(20 responses)
  • B
    80% (16)
  • D
    5% (1)
  • E
    15% (3)

Community Discussion

No community discussion yet for this question.

Full 1Z0-899 Practice