网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
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
参考答案
参考解析
解析:
暂无解析
更多 “单选题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 TLDB Scriptlet code is NOT legal in the body of st:simple.C Add scripting-enabled=true to the start tag for the st:simple elementD 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” 相关考题
考题
Assumethetaghandlerforast:simpletagextendsSimple Tag Support.Inwhatwaycanscriptletcodebeusedinthebodyofst:simple?()
A.SetthebodycontenttypetoJSPintheTLDB.ScriptletcodeisNOTlegalinthebodyofst:simple.C.Addscripting-enabled=truetothestarttagforthest:simpleelementD.Addapass-throughClassictagwithabodycontenttypeofJSPtothebodyofst:simple,andplacethe scriptletcodeinthebodyofthattag
考题
You are creating a content management system (CMS) with a web application front-end. The JSP thatdisplays a given document in the CMS has the following general structure: 1. %-- tag declaration --% 2. ... 11. ... ... ... 99. The citation tag must store information in the document tag for the document tag to generate a referencesection at the end of the generated web page. The document tag handler follows the Classic tag model andthe citation tag handler follows the Simple tag model. Furthermore, the citation tag could also be embeddedin other custom tags that could have either the Classic or Simple tag handler model. Which tag handlermethod allows the citation tag to access the document tag?()A、public void doTag() {JspTag docTag = findAncestorWithClass(this, DocumentTag.class); ((DocumentTag)docTag).addCitation(this.docID);}B、public void doStartTag() {JspTag docTag = findAncestorWithClass(this, DocumentTag.class); ((DocumentTag)docTag).addCitation(this.docID);}C、public void doTag() {. Tag docTag = findAncestor(this, DocumentTag.class); . ((DocumentTag)docTag).addCitation(this.docID);. }D、public void doStartTag() {. Tag docTag = findAncestor(this, DocumentTag.class); . ((DocumentTag)docTag).addCitation(this.docID);. }
考题
Your web application uses a simple architecture in which servlets handle requests and then forward to aJSP using a request dispatcher. You need to pass information calculated by the servlet to the JSP;furthermore, that JSP uses a custom tag and must also process this information. This information mustNOT be accessible to any other servlet, JSP or session in the webapp. How can you accomplish this goal?()A、Store the data in a public instance variable in the servlet.B、Add an attribute to the request object before using the request dispatcher.C、Add an attribute to the context object before using the request dispatcher.D、This CANNOT be done as the tag handler has no means to extract this data.
考题
A custom JSP tag must be able to support an arbitrary number of attributes whose names are unknown when the tag class is designed. Which two are true? ()A、 A element in the echo tag LTD must have the value JSPB、 The echo tag handler must define the setAttribute (String key, String value) methodC、 The true element must appear in the echo tag TLDD、 The class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.IterationTag interfaceE、 The class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.DynamicAttributes interface
考题
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 TLDB、Scriptlet code is NOT legal in the body of st:simple.C、Add scripting-enabled="true" to the start tag for the st:simple elementD、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
考题
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.
考题
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
考题
To take advantage of the capabilities of modern browsers that use web standards, such as XHTML andCSS, your web application is being converted from simple JSP pages to JSP Document format. However,one of your JSPs, /scripts/screenFunctions.jsp, generates a JavaScript file. This file is included in severalweb forms to create screen-specific validation functions and are included in these pages with the followingstatement: 10. 11. 14. 15. Which JSP code snippet declares that this JSP Document is a JavaScript file?()A、%@ page contentType=’application/javascript’ %B、jsp:page contentType='application/javascript' /C、jsp:document contentType='application/javascript' /D、jsp:directive.page contentType='application/javascript' /E、No declaration is needed because the web form XHTML page already declares the MIME type of the /scripts/screenFunctions.jsp file in the script tag.
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.
考题
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.
考题
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-enabled= “true” to the start tag for the st:simple elementD、 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.
考题
Which three are valid values for the body-content attribute of a tag directive in a tag file?()A、ELB、JSPC、EmptyD、DynamicE、ScriptlessF、Tagdependent
考题
The sl:shoppingList and sl:item tags output a shopping list to the response and are used as follows: 11. 12. 13. 14. 15. The tag handler for sl:shoppingList is ShoppingListTag and the tag handler for sl:item is ItemSimpleTag.ShoppingListTag extends BodyTagSupport and ItemSimpleTag extends SimpleTagSupport.Which is true?()A、ItemSimpleTag can find the enclosing instance of ShoppingListTag by calling getParent() and castingthe result to ShoppingListTag.B、ShoppingListTag can find the child instances of ItemSimpleTag by calling super.getChildren() andcasting each to an ItemSimpleTag.C、It is impossible for ItemSimpleTag and ShoppingListTag to find each other in a tag hierarchy becauseone is a Simple tag and the other is a Classic tag.D、ShoppingListTag can find the child instances of ItemSimpleTag by calling getChildren() on thePageContext and casting each to an ItemSimpleTag.E、ItemSimpleTag can find the enclosing instance of ShoppingListTag by calling findAncestorWithClass()on the PageContext and casting the result to ShoppingListTag.
考题
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.
考题
单选题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 TLDB
Scriptlet code is NOT legal in the body of st:simple.C
Add scripting-enabled=true to the start tag for the st:simple elementD
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
考题
单选题The sl:shoppingList and sl:item tags output a shopping list to the response and are used as follows: 11. 12. 13. 14. 15. The tag handler for sl:shoppingList is ShoppingListTag and the tag handler for sl:item is ItemSimpleTag.ShoppingListTag extends BodyTagSupport and ItemSimpleTag extends SimpleTagSupport.Which is true?()A
ItemSimpleTag can find the enclosing instance of ShoppingListTag by calling getParent() and castingthe result to ShoppingListTag.B
ShoppingListTag can find the child instances of ItemSimpleTag by calling super.getChildren() andcasting each to an ItemSimpleTag.C
It is impossible for ItemSimpleTag and ShoppingListTag to find each other in a tag hierarchy becauseone is a Simple tag and the other is a Classic tag.D
ShoppingListTag can find the child instances of ItemSimpleTag by calling getChildren() on thePageContext and casting each to an ItemSimpleTag.E
ItemSimpleTag can find the enclosing instance of ShoppingListTag by calling findAncestorWithClass()on the PageContext and casting the result to ShoppingListTag.
考题
单选题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.
考题
单选题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-enabled= “true” to the start tag for the st:simple elementD
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.
考题
单选题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.
考题
多选题A custom JSP tag must be able to support an arbitrary number of attributes whose names are unknown when the tag class is designed. Which two are true? ()AA element in the echo tag LTD must have the value JSPBThe echo tag handler must define the setAttribute (String key, String value) methodCThe true element must appear in the echo tag TLDDThe class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.IterationTag interfaceEThe class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.DynamicAttributes interface
考题
单选题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 three are valid values for the body-content attribute of a tag directive in a tag file?()AELBJSPCEmptyDDynamicEScriptlessFTagdependent
考题
单选题You are creating a content management system (CMS) with a web application front-end. The JSP thatdisplays a given document in the CMS has the following general structure: 1. 2. ... 11. ... ... ... 99. The citation tag must store information in the document tag for the document tag to generate a referencesection at the end of the generated web page. The document tag handler follows the Classic tag model andthe citation tag handler follows the Simple tag model. Furthermore, the citation tag could also be embeddedin other custom tags that could have either the Classic or Simple tag handler model. Which tag handlermethod allows the citation tag to access the document tag?()A
public void doTag() {JspTag docTag = findAncestorWithClass(this, DocumentTag.class); ((DocumentTag)docTag).addCitation(this.docID);}B
public void doStartTag() {JspTag docTag = findAncestorWithClass(this, DocumentTag.class); ((DocumentTag)docTag).addCitation(this.docID);}C
public void doTag() {. Tag docTag = findAncestor(this, DocumentTag.class); . ((DocumentTag)docTag).addCitation(this.docID);. }D
public void doStartTag() {. Tag docTag = findAncestor(this, DocumentTag.class); . ((DocumentTag)docTag).addCitation(this.docID);. }
考题
单选题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 tagsB
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 countC
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.
考题
多选题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.
考题
多选题Under what two circumstances is the set JspBody method NOT called in a tag class that implements the Simple Tag interface? ()AThe tag is invoked without a body.BThe doTAb method throws an exception.CThe element has the value empty.DThe tag is called with the attribute skip-body=true
考题
单选题The sl:shoppingList and sl:item tags output a shopping list to the response and are used as follows: 11. 12. 13. 14. 15. The tag handler for sl:shoppingList is ShoppingListTag and the tag handler for sl:item is ItemSimpleTag.ShoppingListTag extends BodyTagSupport and ItemSimpleTag extends SimpleTagSupport.Which is true?()A
ItemSimpleTag can find the enclosing instance of ShoppingListTag by calling getParent() and castingthe result to ShoppingListTag.B
ShoppingListTag can find the child instances of ItemSimpleTag by calling super.getChildren() andcasting each to an ItemSimpleTag.C
It is impossible for ItemSimpleTag and ShoppingListTag to find each other in a tag hierarchy becauseone is a Simple tag and the other is a Classic tag.D
ShoppingListTag can find the child instances of ItemSimpleTag by calling getChildren() on thePageContext and casting each to an ItemSimpleTag.E
ItemSimpleTag can find the enclosing instance of ShoppingListTag by calling findAncestorWithClass()on the PageContext and casting the result to ShoppingListTag.
热门标签
最新试卷