多选题A custom tag is defined to take three attributes. Which two correctly invoke the tag within a JSP page?()A<prefix:myTag a=foo b=bar c=baz />B<prefix:myTag attributes={foo,bar,baz} />C<prefix:myTag jsp:attribute a=foo b=bar c=baz />D<prefix:myTag><jsp:a

题目
多选题
A custom tag is defined to take three attributes. Which two correctly invoke the tag within a JSP page?()
A

<prefix:myTag a=foo b=bar c=baz />

B

<prefix:myTag attributes={foo,bar,baz} />

C

<prefix:myTag jsp:attribute a=foo b=bar c=baz />

D

<prefix:myTag><jsp:attribute name=a>foo</jsp:attribute><jsp:attribute name=b>bar</jsp:attribute><jsp:attribute name=c>baz</jsp:attribute>. </prefix:myTag>


相似考题
更多“多选题A custom tag is defined to take three attributes. Which two correctly invoke the tag within a JSP page?()Aprefix:myTag a=foo b=bar c=baz /Bprefix:myTag attributes={foo,bar,baz} /Cprefix:myTag jsp:attribute a=foo b=bar c=baz /Dprefix:myTagjsp:attribute ”相关问题
  • 第1题:

    Given the security constraint in a DD:// 101. 102. 103.Foo 104./Bar/Baz/* 105.POST 106. 107. 108.DEVELOPER 109. 110. And given that "MANAGER" is a valid role-name,which four are true for this security constraint?()

    • A、MANAGER can do a GET on resources in the /Bar/Baz directory.
    • B、MANAGER can do a POST on any resource in the /Bar/Baz directory.
    • C、MANAGER can do a TRACE on any resource in the /Bar/Baz directory.
    • D、DEVELOPER can do a GET on resources in the /Bar/Baz directory.
    • E、DEVELOPER can do only a POST on resources in the /Bar/Baz directory.
    • F、DEVELOPER can do a TRACE on any resource in the /Bar/Baz directory.

    正确答案:A,C,D,F

  • 第2题:

    Which code determines the int value foo closest to a double value bar?()  

    • A、 Int foo = (int) Math.max(bar);
    • B、 Int foo = (int) Math.min(bar);
    • C、 Int foo = (int) Math.abs(bar);
    • D、 Int foo = (int) Math.ceil(bar);
    • E、 Int foo = (int) Math.floor(bar);
    • F、 Int foo = (int) Math.round(bar);

    正确答案:F

  • 第3题:

    Which statements concerning the relationships between the following classes are true?()   class Foo {  int num;   Baz comp = new Baz();   }   class Bar {  boolean flag;   }   class Baz extends Foo {   Bar thing = new Bar();   double limit;   }  

    • A、A Bar is a Baz.
    • B、A Foo has a Bar.
    • C、A Baz is a Foo.
    • D、A Foo is a Baz.
    • E、A Baz has a Bar.

    正确答案:C,E

  • 第4题:

    A custom tag is defined to take three attributes. Which two correctly invoke the tag within a JSP page?()

    • A、<prefix:myTag a="foo" b="bar" c="baz" />
    • B、<prefix:myTag attributes={"foo","bar","baz"} />
    • C、<prefix:myTag jsp:attribute a="foo" b="bar" c="baz" />
    • D、<prefix:myTag><jsp:attribute name="a">foo</jsp:attribute><jsp:attribute name="b">bar</jsp:attribute><jsp:attribute name="c">baz</jsp:attribute>. </prefix:myTag>

    正确答案:A,B,D

  • 第5题:

    int index = 1;   int foo = new int ;   int bar = foo [index];   int baz = bar + index;   What is the result?()

    • A、 Baz has the value of 0
    • B、 Baz has the value of 1
    • C、 Baz has the value of 2
    • D、 An exception is thrown.
    • E、 The code will not compile.

    正确答案:B

  • 第6题:

    多选题
    Given the security constraint in a DD:// 101. 102. 103.Foo 104./Bar/Baz/* 105.POST 106. 107. 108.DEVELOPER 109. 110. And given that "MANAGER" is a valid role-name,which four are true for this security constraint?()
    A

    MANAGER can do a GET on resources in the /Bar/Baz directory.

    B

    MANAGER can do a POST on any resource in the /Bar/Baz directory.

    C

    MANAGER can do a TRACE on any resource in the /Bar/Baz directory.

    D

    DEVELOPER can do a GET on resources in the /Bar/Baz directory.

    E

    DEVELOPER can do only a POST on resources in the /Bar/Baz directory.

    F

    DEVELOPER can do a TRACE on any resource in the /Bar/Baz directory.


    正确答案: D,B
    解析: 暂无解析

  • 第7题:

    多选题
    A custom tag is defined to take three attributes. Which two correctly invoke the tag within a JSP page?()
    A

    <prefix:myTag a=foo b=bar c=baz />

    B

    <prefix:myTag attributes={foo,bar,baz} />

    C

    <prefix:myTag jsp:attribute a=foo b=bar c=baz />

    D

    <prefix:myTag><jsp:attribute name=a>foo</jsp:attribute><jsp:attribute name=b>bar</jsp:attribute><jsp:attribute name=c>baz</jsp:attribute>. </prefix:myTag>


    正确答案: A,C
    解析: 暂无解析

  • 第8题:

    单选题
    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”);


    正确答案: C
    解析: 暂无解析

  • 第9题:

    单选题
    public class Test {  public static void main (String[]args) {  String foo = args[1];  String bar = args[2];  String baz = args[3];  System.out.printIn(“baz = ” + baz);  }  }  And the output:  Baz = 2  Which command line invocation will produce the output?()
    A

     Java Test 2222

    B

     Java Test 1 2 3 4

    C

     Java Test 4 2 4 2

    D

     Java Test 4 3 2 1


    正确答案: B
    解析: 暂无解析

  • 第10题:

    单选题
    Which JSP standard action can be used to import content from a resource called foo.jsp?()
    A

    <jsp:import file=’foo.jsp’ />

    B

    <jsp:import page=’foo.jsp’ />

    C

    <jsp:include page=’foo.jsp’ />

    D

    <jsp:include file=’foo.jsp’ />


    正确答案: D
    解析: 暂无解析

  • 第11题:

    多选题
    Which statements concerning the relationships between the following classes are true?()   class Foo {  int num;   Baz comp = new Baz();   }   class Bar {  boolean flag;   }   class Baz extends Foo {   Bar thing = new Bar();   double limit;   }
    A

    A Bar is a Baz.

    B

    A Foo has a Bar.

    C

    A Baz is a Foo.

    D

    A Foo is a Baz.

    E

    A Baz has a Bar.


    正确答案: E,A
    解析: 暂无解析

  • 第12题:

    单选题
    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?()
    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)


    正确答案: B
    解析: 暂无解析

  • 第13题:

    public class Test {  public static void main( String[] args) {  String foo = args[1];  String bar = args[2];  String baz = args[3];  System.out.println(“baz = “ + baz); }  }   And the command line invocation: java Test red green blue   What is the result?()  

    • A、 baz =
    • B、 baz = null
    • C、 baz = blue
    • D、 Compilation fails.
    • E、 An exception is thrown at runtime.

    正确答案:E

  • 第14题:

    public class Test {  public static void main (String[]args) {  String foo = args[1];  String bar = args[2];  String baz = args[3];  System.out.printIn(“baz = ” + baz);  }  }  And the output:  Baz = 2  Which command line invocation will produce the output?()  

    • A、 Java Test 2222
    • B、 Java Test 1 2 3 4
    • C、 Java Test 4 2 4 2
    • D、 Java Test 4 3 2 1

    正确答案:C

  • 第15题:

    What is wrong with the following code?()   class MyException extends Exception {}   public class Qb4ab {   public void foo() {  try {  bar();  } finally {  baz();   } catch (MyException e) {}  }   public void bar() throws MyException {   throw new MyException();  }   public void baz() throws RuntimeException {   throw new RuntimeException();   }   }  

    • A、Since the method foo() does not catch the exception generated by the method baz(), it must      declare the RuntimeException in its throws clause.
    • B、A try block cannot be followed by both a catch and a finally block.
    • C、An empty catch block is not allowed.
    • D、A catch block cannot follow a finally block.
    • E、A finally block must always follow one or more catch blocks.

    正确答案:D

  • 第16题:

    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

  • 第17题:

    public class test(   public static void main(stringargs){   string foo = args [1];   string foo = args ;   string foo = args ;   }   )   And command line invocation:  Java Test red green blue  What is the result? () 

    • A、 Baz has the value of “”
    • B、 Baz has the value of null
    • C、 Baz has the value of “red”
    • D、 Baz has the value of “blue”
    • E、 Bax has the value of “green”
    • F、 The program throws an exception.

    正确答案:F

  • 第18题:

    单选题
    int index = 1;  int [] foo = new int [3];  int bar = foo [index];  int baz = bar + index;   What is the result?()
    A

     Baz has the value of 0

    B

     Baz has the value of 1

    C

     Baz has the value of 2

    D

     An exception is thrown.

    E

     The code will not compile.


    正确答案: C
    解析: 暂无解析

  • 第19题:

    单选题
    public class Test {  public static void main( String[] args) {  String foo = args[1];  String bar = args[2];  String baz = args[3];  System.out.println(“baz = “ + baz); }  }   And the command line invocation: java Test red green blue   What is the result?()
    A

     baz =

    B

     baz = null

    C

     baz = blue

    D

     Compilation fails.

    E

     An exception is thrown at runtime.


    正确答案: C
    解析: A java.lang.ArrayIndexOutOfBoundsException is thrown because of line 3, should be args[0].

  • 第20题:

    单选题
    What is wrong with the following code?()   class MyException extends Exception {}   public class Qb4ab {   public void foo() {  try {  bar();  } finally {  baz();   } catch (MyException e) {}  }   public void bar() throws MyException {   throw new MyException();  }   public void baz() throws RuntimeException {   throw new RuntimeException();   }   }
    A

    Since the method foo() does not catch the exception generated by the method baz(), it must      declare the RuntimeException in its throws clause.

    B

    A try block cannot be followed by both a catch and a finally block.

    C

    An empty catch block is not allowed.

    D

    A catch block cannot follow a finally block.

    E

    A finally block must always follow one or more catch blocks.


    正确答案: B
    解析: 暂无解析

  • 第21题:

    多选题
    Given the security constraint in a DD:// 101. 102. 103.Foo 104./Bar/Baz/* 105.POST 106. 107. 108.DEVELOPER 109. 110. And given that "MANAGER" is a valid role-name,which four are true for this security constraint?()
    A

    MANAGER can do a GET on resources in the /Bar/Baz directory.

    B

    MANAGER can do a POST on any resource in the /Bar/Baz directory.

    C

    MANAGER can do a TRACE on any resource in the /Bar/Baz directory.

    D

    DEVELOPER can do a GET on resources in the /Bar/Baz directory.

    E

    DEVELOPER can do only a POST on resources in the /Bar/Baz directory.

    F

    DEVELOPER can do a TRACE on any resource in the /Bar/Baz directory.


    正确答案: A,C,D,F
    解析: 暂无解析

  • 第22题:

    单选题
    Which code determines the int value foo closest to a double value bar?()
    A

     Int foo = (int) Math.max(bar);

    B

     Int foo = (int) Math.min(bar);

    C

     Int foo = (int) Math.abs(bar);

    D

     Int foo = (int) Math.ceil(bar);

    E

     Int foo = (int) Math.floor(bar);

    F

     Int foo = (int) Math.round(bar);


    正确答案: D
    解析: 暂无解析

  • 第23题:

    多选题
    A custom tag is defined to take three attributes. Which two correctly invoke the tag within a JSP page?()
    A

    <prefix:myTag a=foo b=bar c=baz />

    B

    <prefix:myTag attributes={foo,bar,baz} />

    C

    <prefix:myTag jsp:attribute a=foo b=bar c=baz />

    D

    <prefix:myTag><jsp:attribute name=a>foo</jsp:attribute><jsp:attribute name=b>bar</jsp:attribute><jsp:attribute name=c>baz</jsp:attribute>. </prefix:myTag>


    正确答案: C,A
    解析: 暂无解析

  • 第24题:

    单选题
    int index = 1;   int foo = new int ;   int bar = foo [index];   int baz = bar + index;   What is the result?()
    A

     Baz has the value of 0

    B

     Baz has the value of 1

    C

     Baz has the value of 2

    D

     An exception is thrown.

    E

     The code will not compile.


    正确答案: E
    解析: 暂无解析