A.EL B.JSP C.Empty D.Dynamic E.Scriptless F.Tagdependent
多项选择题Given: 6.<myTag:foo bar=’42’> 7.<%= processing %> 8.< myTag:foo> and a custom tag handler for foo which extends TagSupport. Which two are true about thetag handler referenced by foo?()
A.The doStartTag method is called once. B.The doAfterBody method is NOT called. C.The EVAL_PAGE constant is a valid return value for the doEndTag method. D.The SKIP_PAGE constant is a valid return value for the doStartTag method. E.The EVAL_BODY_BUFFERED constant is a valid return value for the doStartTag method.
单项选择题Given: 5.public class MyTagHandler extends TagSupport { 6.public int doStartTag() throws JspException { 7.try { 8. insert code here 9.} catch(Exception ex) { * handle exception * } 10.return super.doStartTag(); 11.}...42. } Which code snippet, inserted at line 8,causes the value foo to be output?()
A.JspWriter w = pageContext.getOut(); B.print("foo"); C.JspWriter w = pageContext.getWriter(); D.JspWriter w = new JspWriter(pageContext.getWriter()); . w.print("foo");
多项选择题Click the Exhibit button. The h:highlight tag renders its body, highlighting an arbitrary number of words, each of which is passed asan attribute (word1, word2, ...). For example, a JSP page can invoke theh:highlight tag as follows: 11. 12. high medium low 13. Given that HighlightTag extends SimpleTagSupport,which three steps are necessary to implement the taghandler for the highlight tag?()
A.Add a doTag method B.Add a doStartTag method C.Add a getter and setter for the color attribute D.Create and implement a TagExtraInfo class E.Implement the DynamicAttributes interface F.Add a getter and setter for the word1 and word2 attributes
多项选择题Given an EL function declared with:11. <function> 12.<name>spin< name> 13.<function-class>com.example.Spinner< function-class> 14.<function-signature> 15.java.lang.String spinIt() 16.< function-signature> 17.< function> Which two are true?()
A.The function method must have the signature: public String spin(). B.The method must be mapped to the logical name "spin" in the web.xml file. C.The function method must have the signature: public String spinIt(). D.The function method must have the signature public static String spin(). E.The function method must have the signature: public static String spinIt(). F.The function class must be named Spinner, and must be in the package com.example.
单项选择题Given a web application in which the cookie userName is expected to contain the name of the user. Which EL expression evaluates to that user name?()
A.${userName} B.${cookie.userName} C.${cookie.user.name} D.${cookies.userName[0]}