多选题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

题目
多选题
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.

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

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”);

正确答案:D

第2题:

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.

正确答案:C

第3题:

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().

正确答案:B,C

第4题:

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.

正确答案:B,C

第5题:

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.

正确答案:C

第6题:

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 TLD
  • D、 The do Start Tag Method must always return SKIP_BODY.
  • E、 The TLD for this tag must NOT include a  tag.

正确答案:C

第7题:

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; }

正确答案:C,D

第8题:

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.

正确答案:A,C

第9题:

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 doStartTag
  • D、String x = (String) pageContext.getRequest().getAttribute("foo")
  • E、String x = (String) pageContext.getAttribute("foo", PageContext.ANY_SCOPE)

正确答案:D

第10题:

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.

正确答案:C

更多相关问题