Given:
1. package com.example;
2.
3. public abstract class AbstractItem {
4. private String name;
…
13. }
Assume a concrete class com.example.ConcreteItem extends com.example.AbstractItem. A
servlet sets a session-scoped attribute called “item” that is an instance of
com.example.ConcreteItem and then forwards to a JSP page.
Which two are valid standard action invocations that expose a scripting variable to the JSP page?
(Choose two.)
A.
<jsp:useBean id=”com.example.ConcreteItem”
scope=”session” />
B.
<jsp:useBean id=”item” type=”com.example.ConcreteItem”
scope=”session” />
C.
<jsp:useBean id=”item” class=”com.example.ConcreteItem”
scope=”session” />
D.
<jsp:useBean id=”item” type=”com.example.ConcreteItem”
class=”com.example.AbstractItem”
scope=”session” />
Explanation: