多选题Given: 6. 7. 8. and a custom tag handler for foo which extends TagSupport. Which two are true about thetag handler referenced by foo?()AThe doStartTag method is called once.BThe doAfterBody method is NOT called.CThe EVAL_PAGE constant is a valid return value for the doEndTag method.DThe SKIP_PAGE constant is a valid return value for the doStartTag method.EThe EVAL_BODY_BUFFERED constant is a valid return value for the doStartTag method.

多选题
Given: 6. 7. 8. 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.


参考解析

解析: 暂无解析

相关考题:

10. class Foo {  11. static void alpha() { /* more code here */ }  12. void beta() { /* more code here */ }  13. }  Which two are true?()A、 Foo.beta() is a valid invocation of beta().B、 Foo.alpha() is a valid invocation of alpha().C、 Method beta() can directly call method alpha().D、 Method alpha() can directly call method beta().

Given: 6. 7.%="processing" % 8. 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.

Assume a tag handler extends TagSupport. Which is used within the tag handler to get an attribute “foo” that is in the application scope?()A、 pageContext.getAttribute(“foo”);B、 getPageContext().getAttribute(“foo”);C、 pageContext.getApplicationScope(“foo”);D、 pageContext.getAttribute(“foo”,pageContext.APPLICATION_SCOPE).getAttribute(“foo”);E、 getPageContext().getScope(pageContext.APPLICATION_SCOPE).getAttribute(“foo”);

Given the Tag:   Assuming the tag referenced by my Tags: get Advice uses the Classic event model,  which is true?()A、 The do After Body method is called.B、 The doEnd Tag method is NOT called.C、 The type attribute may be specified in the TLDD、 The do Start Tag Method must always return SKIP_BODY.E、 The TLD for this tag must NOT include a  tag.

Which statement is true if the do Start Tag method returns EVAL_BODY_BUFFERED?()A、 The tag handler must extend body Tag.B、 The do After Body method is NOT called.C、 The set Body Content method is called.D、 It is never legal to return EVAL_BODY_BUFFERED from do Start Tag.

class One {   public One foo() { return this; }  }  class Two extends One {  public One foo() { return this; }  }  class Three extends Two {   // insert method here  }  Which two methods, inserted individually, correctly complete the Three class?()A、 public void foo() { }B、 public int foo() { return 3; }C、 public Two foo() { return this; }D、 public One foo() { return this; }E、 public Object foo() { return this; }

Which statement is true if the doStartTag method returns EVAL_BODY_BUFFERED?()A、The tag handler must implement BodyTag.B、The doAfterBody method is NOT called.C、The setBodyContent method is called once.D、It is never legal to return EVAL_BODY_BUFFERED from doStartTag.

Given the JSP code: % request.setAttribute("foo", "bar"); %and the Classic tag handler code: 5. public int doStartTag() throws JspException { 6. // insert code here 7. // return int 8. } Assume there are no other "foo" attributes in the web application. 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 doStartTagD、String x = (String) pageContext.getRequest().getAttribute("foo")E、String x = (String) pageContext.getAttribute("foo", PageContext.ANY_SCOPE)

Which two statements are true about using the isUserInRole method to implement security in a Java EEapplication?()A、It can be invoked only from the doGet or doPost methods.B、It can be used independently of the getRemoteUser method.C、Can return "true" even when its argument is NOT defined as a valid role name in the deployment descriptor.D、Using the isUserInRole method overrides any declarative authentication related to the method in which it is invoked.

Which statement is true?()A、A class’s finalize() method CANNOT be invoked explicitly.B、super.finalize() is called implicitly by any overriding finalize() method.C、The finalize() method for a given object is called no more than once by the garbage collector.D、The order in which finalize() is called on two objects is based on the order in which the two objects became finalizable.

Given:   10. class One {   11. void foo() { }   12. }   13. class Two extends One {   14. //insert method here   15. }   Which three methods, inserted individually at line 14, will correctly complete class Two?()A、 public void foo() { /* more code here */ }B、 private void foo() { /* more code here */ }C、 protected void foo() { /* more code here */ }D、 int foo() { /* more code here */ }  E、 void foo() { /* more code here */ }

多选题Given:   10. class One {   11. void foo() { }   12. }   13. class Two extends One {   14. //insert method here   15. }   Which three methods, inserted individually at line 14, will correctly complete class Two?()Apublic void foo() { /* more code here */ }Bprivate void foo() { /* more code here */ }Cprotected void foo() { /* more code here */ }Dint foo() { /* more code here */ }Evoid foo() { /* more code here */ }

多选题Which two are true?()AA finalizer may NOT be invoked explicitly.BThe finalize method declared in class Object takes no action.Csuper.finalize()is called implicitly by any over riding finalize method.DThe finalize method for a given objec twill be called no more than once by the garbage collector.EThe order in which finalize will be called on two objects is based on the order in which the two objects became finalizable.

单选题Which statement is true if the doStartTag method returns EVAL_BODY_BUFFERED?()AThe tag handler must implement BodyTag.BThe doAfterBody method is NOT called.CThe setBodyContent method is called once.DIt is never legal to return EVAL_BODY_BUFFERED from doStartTag.

单选题Assume a tag handler extends TagSupport. Which is used within the tag handler to get an attribute “foo” that is in the application scope?()A pageContext.getAttribute(“foo”);B getPageContext().getAttribute(“foo”);C pageContext.getApplicationScope(“foo”);D pageContext.getAttribute(“foo”,pageContext.APPLICATION_SCOPE).getAttribute(“foo”);E getPageContext().getScope(pageContext.APPLICATION_SCOPE).getAttribute(“foo”);

单选题Which statement is true if the do Start Tag method returns EVAL_BODY_BUFFERED?()A The tag handler must extend body Tag.B The do After Body method is NOT called.C The set Body Content method is called.D It is never legal to return EVAL_BODY_BUFFERED from do Start Tag.

单选题Given the Tag:   Assuming the tag referenced by my Tags: get Advice uses the Classic event model,  which is true?()A The do After Body method is called.B The doEnd Tag method is NOT called.C The type attribute may be specified in the TLDD The do Start Tag Method must always return SKIP_BODY.E The TLD for this tag must NOT include a  tag.

多选题Given: String value = getServletContext().getInitParameter("foo"); in an HttpServlet and a web applicationdeployment descriptor that contains: foo frodo Which two are true?()AThe foo initialization parameter CANNOT be set programmatically.BCompilation fails because getInitParameter returns type Object.CThe foo initialization parameter is NOT a servlet initialization parameter.DCompilation fails because ServletContext does NOT have a getInitParameter method.EThe foo parameter must be defined within the  element of the deployment descriptor.

多选题class One {  void foo() {}  }  class Two extends One {   //insert method here  }  Which three methods, inserted individually at line 14, will correctly complete class Two?()Aint foo() { /* more code here */ }Bvoid foo() { /* more code here */ }Cpublic void foo() { /* more code here */ }Dprivate void foo() { /* more code here */ }Eprotected void foo() { /* more code here */ }

多选题class One {   public One foo() { return this; }  }  class Two extends One {  public One foo() { return this; }  }  class Three extends Two {   // insert method here  }  Which two methods, inserted individually, correctly complete the Three class?()Apublic void foo() { }Bpublic int foo() { return 3; }Cpublic Two foo() { return this; }Dpublic One foo() { return this; }Epublic Object foo() { return this; }

多选题Given: 6. Which two successfully translate and result in a value of true?()A${true or false}B${requestScope[foo][0]  500}C${requestScope[’foo’][1] = 420}D${(requestScope[’foo’][0] lt 50)  (3 gt 2)}

多选题Which two are true about the tag handler referneed by my Tag. ()AThe do Start Tag method is called once.BThe do After Body method is NOT called.CThe EVAL_Page constant is a valid return value for the do End Tag Method.Dthe EVAL_BODY_BUFFERED constant is a valid return value for the do Start Tag method.

多选题Which two statements are true about using the isUserInRole method to implement security in a Java EEapplication?()AIt can be invoked only from the doGet or doPost methods.BIt can be used independently of the getRemoteUser method.CCan return true even when its argument is NOT defined as a valid role name in the deployment descriptor.DUsing the isUserInRole method overrides any declarative authentication related to the method in which it is invoked.

单选题Given the JSP code: and the Classic tag handler code: 5. public int doStartTag() throws JspException { 6. // insert code here 7. // return int 8. } Assume there are no other "foo" attributes in the web application. Which invocation on the pageContextobject,inserted at line 6,assigns "bar" to the variable x?()AString x = (String) pageContext.getAttribute(foo)BString x = (String) pageContext.getRequestScope(foo)CIt is NOT possible to access the pageContext object from within doStartTagDString x = (String) pageContext.getRequest().getAttribute(foo)EString x = (String) pageContext.getAttribute(foo, PageContext.ANY_SCOPE)

多选题Given: 3.public class MyTagHandler extends TagSupport { 4.public int doStartTag() { 5.// insert code here 6.// return an int 7.} 8.// more code here ... 18.} There is a single attribute foo in the session scope. Which three code fragments,inserted independently atline 5,return the value of the attribute?()AObject o = pageContext.getAttribute(foo);BObject o = pageContext.findAttribute(foo);CObject o = pageContext.getAttribute(foo,PageContext.SESSION_SCOPE);DHttpSession s = pageContext.getSession();Object o = s.getAttribute(foo);

多选题Given: 6. 7. 8. and a custom tag handler for foo which extends TagSupport. Which two are true about thetag handler referenced by foo?()AThe doStartTag method is called once.BThe doAfterBody method is NOT called.CThe EVAL_PAGE constant is a valid return value for the doEndTag method.DThe SKIP_PAGE constant is a valid return value for the doStartTag method.EThe EVAL_BODY_BUFFERED constant is a valid return value for the doStartTag method.

单选题Given the JSP code: and the Classic tag handler code: 5. public int doStartTag() throws JspException { 6. // insert code here 7. // return int 8. } Assume there are no other "foo" attributes in the web application. Which invocation on the pageContextobject,inserted at line 6,assigns "bar" to the variable x?()AString x = (String) pageContext.getAttribute(foo)BString x = (String) pageContext.getRequestScope(foo)CIt is NOT possible to access the pageContext object from within doStartTagDString x = (String) pageContext.getRequest().getAttribute(foo)EString x = (String) pageContext.getAttribute(foo, PageContext.ANY_SCOPE)