Given the JSP code:<br /> <% request.setAttribute("foo", "bar"); %>and the Classic tag handler code:<br /> 5. public int doStartTag() throws JspException {<br /> 6. // insert code here<br /> 7. // return int<br /> 8. }<br /> Assume there are no other "foo" attributes in the web application.<br /> Which invocation on the pageContextobject,inserted at line 6,assigns "bar" to the variable x?()
A、String x = (String) pageContext.getAttribute("foo")
B、String x = (String) pageContext.getRequestScope("foo")
C、It is NOT possible to access the pageContext object from within doStartTag
D、String x = (String) pageContext.getRequest().getAttribute("foo")
E、String x = (String) pageContext.getAttribute("foo", PageContext.ANY_SCOPE)