Which are valid method calls on a PageContext object?
(Choose all that apply.)
A. getAttributeNames()
B. getAttribute(“key”)
C. findAttribute(“key”)
D. getSessionAttribute()
E. getAttributesScope(“key”)
F. findAttribute(“key”, PageContext.SESSION_SCOPE)
G. getAttribute(“key”, PageContext.SESSION_SCOPE)
b,c,e,g
Couldnt undertsand why E is corerct.
2:
Given:
10. public class BufTag extends BodyTagSupport {
11. public int doStartTag() throws JspException {
12. // insert code here
13. }
14. }
Assume that the tag has been properly configured to allow body content.
Which, if inserted at line 12, would cause the
JSP code
<mytags:mytag>BodyContent</mytags:mytag> to output BodyContent?
A. return SKIP_BODY;
B. return EVAL_BODY_INCLUDE;
C. return EVAL_BODY_BUFFERED;
D. return BODY_CONTENT;
Answer B