单选题Assume the tag handler for a st:simpletag extends SimpleTagSupport. In what way can scriptlet code be used in the body of st:simple?()ASet the body content type to JSP in the TLDBScriptlet code is NOT legal in the body of st:simpleCAdd scripting-enable

题目
单选题
Assume the tag handler for a st:simpletag extends SimpleTagSupport. In what way can scriptlet code be used in the body of st:simple?()
A

 Set the body content type to JSP in the TLD

B

 Scriptlet code is NOT legal in the body of st:simple

C

 Add scripting-enabled= “true” to the start tag for the st:simple element

D

 Add a pass-through Classic tag with a body content type of JSP to the body of st:simple, and      place the scriptlet code in the body of that tag.


相似考题
更多“单选题Assume the tag handler for a st:simpletag extends SimpleTagSupport. In what way can scriptlet code be used in the body of st:simple?()A  Set the body content type to JSP in the TLDB  Scriptlet code is NOT legal in the body of st:simpleC  Add scripting-”相关问题
  • 第1题:

    You have created a JSP that includes instance variables and a great deal of scriptlet code. Unfortunately,after extensive load testing, you have discovered several race conditions in your JSP scriptlet code. To fixthese problems would require significant recoding, but you are already behind schedule. Which JSP codesnippet can you use to resolve these concurrency problems?()

    • A、<%@ page isThreadSafe=’false’ %>
    • B、<%@ implements SingleThreadModel %>
    • C、<%! implements SingleThreadModel %>
    • D、<%@ page useSingleThreadModel=’true’ %>
    • E、<%@ page implements=’SingleThreadModel’ %>

    正确答案:A

  • 第2题:

    You are creating a Windows Communication Foundation (WCF) service that implements the following service contract.[ServiceContract]public interface IOrderProcessing { [OperationContract] void ApproveOrder(int id);}You need to ensure that only users with the Manager role can call the ApproveOrder method. What should you do?()

    • A、In the method body, check the Rights PosessesProperty property to see if it contains Manager
    • B、Add a PrincipalPermission attribute to the method and set the Roles property to Manager
    • C、Add a SecurityPermission attribute to the method and set the SecurityAction to Demand
    • D、In the method body, create a new instance of WindowsClaimSet. Use the FindClaims method to locate a claimType named Role with a right named Manager

    正确答案:B

  • 第3题:

    You have built your own light-weight templating mechanism. Your servlets, which handle each request,dispatch the request to one of a small set of template JSP pages. Each template JSP controls the layout ofthe view by inserting the header, body, and footer elements into specific locations within the template page.The URLs for these three elements are stored in request scoped variables called, headerURL, bodyURL,and footerURL, respectively. These attribute names are never used for other purposes. Which JSP codesnippet should be used in the template JSP to insert the JSP content for the body of the page?()

    • A、<jsp:insert page=’${bodyURL}’ />
    • B、<jsp:insert file=’${bodyURL}’ />
    • C、<jsp:include page=’${bodyURL}’ />
    • D、<jsp:include file=’${bodyURL}’ />
    • E、<jsp:insert page=’<%= bodyURL %>’ />

    正确答案:C

  • 第4题:

    Assume the tag handler for a st:simpletag extends SimpleTagSupport. In what way can scriptlet code be used in the body of st:simple?()

    • A、 Set the body content type to JSP in the TLD
    • B、 Scriptlet code is NOT legal in the body of st:simple
    • C、 Add scripting-enabled= “true” to the start tag for the st:simple element
    • D、 Add a pass-through Classic tag with a body content type of JSP to the body of st:simple, and      place the scriptlet code in the body of that tag.

    正确答案:B

  • 第5题:

    Which the two are true about the JSTL core iteration custom tags?()

    • A、 It may iterate over arrays, collections, maps and strings.
    • B、 The body of the tag may contain EL code, but not scripting code.
    • C、 When looping over collections, a loop status object may be used in the tag body.
    • D、 It may iterate over a map, but only the key of the mapping may be used in the tag body.
    • E、 When looping over integers (for example begin1=’1’ end=’10’), a loop status object may not be used in the tag body.

    正确答案:A,C

  • 第6题:

    You are creating a Windows Forms application by using the .NET Framework 3.5. You plan to develop a new control for the application.You need to ensure that the control extends the TreeView control by adding a custom node tag and a highlight color.What should you do?()

    • A、Override the OnPaint method.
    • B、Write a code segment in the DrawNode event handler to specify the highlight color.
    • C、Set the DrawMode property of the control to OwnerDrawAll, and then implement a custom DrawNode event handler.
    • D、Set the DrawMode property of the control to OwnerDrawText,and then implement a custom DrawNode event handler.

    正确答案:D

  • 第7题:

    单选题
    Assume the tag handler for a st:simpletag extends SimpleTagSupport. In what way can scriptlet code be used in the body of st:simple?()
    A

     Set the body content type to JSP in the TLD

    B

     Scriptlet code is NOT legal in the body of st:simple

    C

     Add scripting-enabled= “true” to the start tag for the st:simple element

    D

     Add a pass-through Classic tag with a body content type of JSP to the body of st:simple, and      place the scriptlet code in the body of that tag.


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

  • 第8题:

    单选题
    Which JSTL code snippet can be used to import content from another web resource?()
    A

    <c:import url=foo.jsp/>

    B

    <c:import page=foo.jsp/>

    C

    <c:include url=foo.jsp/>

    D

    <c:include page=foo.jsp/>


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

  • 第9题:

    单选题
    You have built your own light-weight templating mechanism. Your servlets, which handle each request,dispatch the request to one of a small set of template JSP pages. Each template JSP controls the layout ofthe view by inserting the header, body, and footer elements into specific locations within the template page.The URLs for these three elements are stored in request scoped variables called, headerURL, bodyURL,and footerURL, respectively. These attribute names are never used for other purposes. Which JSP codesnippet should be used in the template JSP to insert the JSP content for the body of the page?()
    A

    <jsp:insert page=’${bodyURL}’ />

    B

    <jsp:insert file=’${bodyURL}’ />

    C

    <jsp:include page=’${bodyURL}’ />

    D

    <jsp:include file=’${bodyURL}’ />

    E

    <jsp:insert page=’<%= bodyURL %>’ />


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

  • 第10题:

    单选题
    The tag handler for n:recurse extends SimpleTagSupport.Assuming an n:recurse tag can either contain an empty body or another n:recurse tag, which strategy allows the tag handler for n:recurse to output the nesting depth of the deepest n:recurse tag?()
    A

     It is impossible to determine the deepest nesting depth because it is impossible for tag handlers that extend SimpleTagSupport to communicate with their parent and child tags

    B

     Create a private non-static attribute in the tag handler class called count of type int initialized to      oIncrement count in the doTag method. If the tag has a body, invoke the fragment for that body. Otherwise, output the value of count

    C

     Start a counter at 1. Call getChildTags(). If it returns null, output the value of the counter.      Otherwise, increment counter and continue from where getChildTags() is called. Skip      processing of the body.

    D

     If the tag has a body, invoke the fragment for that body. Otherwise, start a counter at 1. Call      getParent(). If it returns null, output the value of the counter. Otherwise, increment the counter      and continue from where getParent() is called.


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

  • 第11题:

    多选题
    Under what two circumstances is the set JspBody method NOT called in a tag class that implements the Simple Tag interface? ()
    A

    The tag is invoked without a body.

    B

    The doTAb method throws an exception.

    C

    The  element has the value empty.

    D

    The tag is called with the attribute skip-body=true


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

  • 第12题:

    单选题
    Assume the tag handler for a st:simple tag extends Simple Tag Support. In what way can scriptlet code beused in the body of st:simple?()
    A

    Set the body content type to JSP in the TLD

    B

    Scriptlet code is NOT legal in the body of st:simple.

    C

    Add scripting-enabled=true to the start tag for the st:simple element

    D

    Add a pass-through Classic tag with a body content type of JSP to the body of st:simple, and place the scriptlet code in the body of that tag


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

  • 第13题:

    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

  • 第14题:

    Which JSTL code snippet can be used to import content from another web resource?()

    • A、<c:import url="foo.jsp"/>
    • B、<c:import page="foo.jsp"/>
    • C、<c:include url="foo.jsp"/>
    • D、<c:include page="foo.jsp"/>

    正确答案:A

  • 第15题:

    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

  • 第16题:

    Which three are valid values for the body-content attribute of a tag directive in a tag file?()

    • A、EL
    • B、JSP
    • C、Empty
    • D、Dynamic
    • E、Scriptless
    • F、Tagdependent

    正确答案:C,E,F

  • 第17题:

    You are developing a Windows Presentation Foundation (WPF) application. The application contains stylized body text and heading text. The heading text is a slight variation of the body text. You need to ensure that if the body text changes, the heading text automatically inherits those changes. What should you do ?()

    • A、 Set the Value property of the style setter to point to a static resource
    • B、 Set the BasedOn property of the heading style to point to a static resource for the body text style
    • C、 Set the Key property of the heading style to start with the name of the body text style
    • D、 Set the TargetType property of the heading style to TextBlock

    正确答案:B

  • 第18题:

    单选题
    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.


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

  • 第19题:

    单选题
    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
    解析: 暂无解析

  • 第20题:

    单选题
    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.


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

  • 第21题:

    多选题
    Which three are valid values for the body-content attribute of a tag directive in a tag file?()
    A

    EL

    B

    JSP

    C

    Empty

    D

    Dynamic

    E

    Scriptless

    F

    Tagdependent


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

  • 第22题:

    多选题
    Which two are true about the tag handler referneed by my Tag. ()
    A

    The do Start Tag method is called once.

    B

    The do After Body method is NOT called.

    C

    The EVAL_Page constant is a valid return value for the do End Tag Method.

    D

    the EVAL_BODY_BUFFERED constant is a valid return value for the do Start Tag method.


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

  • 第23题:

    单选题
    You have created a JSP that includes instance variables and a great deal of scriptlet code. Unfortunately,after extensive load testing, you have discovered several race conditions in your JSP scriptlet code. To fixthese problems would require significant recoding, but you are already behind schedule. Which JSP codesnippet can you use to resolve these concurrency problems?()
    A

    <%@ page isThreadSafe=’false’ %>

    B

    <%@ implements SingleThreadModel %>

    C

    <%! implements SingleThreadModel %>

    D

    <%@ page useSingleThreadModel=’true’ %>

    E

    <%@ page implements=’SingleThreadModel’ %>


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

  • 第24题:

    单选题
    For manageability purposes, you have been told to add a "count" instance variable to a critical JSP Document so that a JMX MBean can track how frequent this JSP is being invoked. Which JSP code snippetmust you use to declare this instance variable in the JSP Document?()
    A

    <jsp:declaration>int count = 0;<jsp:declaration>

    B

    <%! int count = 0; %>

    C

    <jsp:declaration.instance>int count = 0;. <jsp:declaration.instance>

    D

    <jsp:scriptlet.declaration>int count = 0;. <jsp:scriptlet.declaration>


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