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

题目
单选题
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
解析: 暂无解析
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

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

第2题:

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

第3题:

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>

正确答案:A

第4题:

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

第5题:

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

第6题:

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

正确答案:A,C

第7题:

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

第8题:

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

正确答案:B

第9题:

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

第10题:

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

更多相关问题