Oracle
1Z0-899 · Question #50
Click the Exhibit button. Given the HTML form: 1. <html> 2. <body> 3. <form action="submit.jsp"> 4. Name: <input type="text" name="i1"><br> 5. Price: <input type="text" name="i2"><br> 6. <input…
The correct answer is C. <jsp:useBean id="product" class="com.example.Product">. See the full explanation below for the reasoning.
Question
Click the Exhibit button. Given the HTML form: 1. <html> 2. <body> 3. <form action="submit.jsp"> 4. Name: <input type="text" name="i1"><br> 5. Price: <input type="text" name="i2"><br> 6. <input type="submit"> 7. </form> 8. </body> 9. </html> 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?
Exhibit
Options
- A<jsp:useBean id="com.example.Product" />
- B<jsp:useBean id="product" class="com.example.Product" />
- C<jsp:useBean id="product" class="com.example.Product">
- D<jsp:useBean id="product" type="com.example.Product">
How the community answered
(23 responses)- A4% (1)
- B4% (1)
- C83% (19)
- D9% (2)
Community Discussion
No community discussion yet for this question.
