Given:<br /> 5.public class MyTagHandler extends TagSupport {<br /> 6.public int doStartTag() throws JspException {<br /> 7.try {<br /> 8.// insert code here<br /> 9.} catch(Exception ex) { /* handle exception */ }<br /> 10.return super.doStartTag();<br /> 11.}...42. }<br /> Which code snippet, inserted at line 8,causes the value foo to be output?()<p> Given:<br /> 5.public class MyTagHandler extends TagSupport {<br /> 6.public int doStartTag() throws JspException {<br /> 7.try {<br /> 8.// insert code here<br /> 9.} catch(Exception ex) { /* handle exception */ }<br /> 10.return super.doStartTag();<br /> 11.}...42. }<br /> Which code snippet, inserted at line 8,
A、A.JspWriter w = pageContext.getOut();
B、B.print("foo");
C、C.JspWriter w = pageContext.getWriter();
D、D.JspWriter w = new JspWriter(pageContext.getWriter()); . w.print("foo");