Given the Tag:
第1题:
Which two statements are true about the security-related tags in a valid Java EE deployment descriptor?()
第2题:
Which three occur during JSP page translation?()
第3题:
Which statement is true if the do Start Tag method returns EVAL_BODY_BUFFERED?()
第4题:
Which statement is true if the doStartTag method returns EVAL_BODY_BUFFERED?()
第5题:
Which three are valid values for the body-content attribute of a tag directive in a tag file?()
第6题:
Which the two are true about the JSTL core iteration custom tags?()
第7题:
The tag handler must implement BodyTag.
The doAfterBody method is NOT called.
The setBodyContent method is called once.
It is never legal to return EVAL_BODY_BUFFERED from doStartTag.
第8题:
The tag handler must extend body Tag.
The do After Body method is NOT called.
The set Body Content method is called.
It is never legal to return EVAL_BODY_BUFFERED from do Start Tag.
第9题:
EL
JSP
Empty
Dynamic
Scriptless
Tagdependent
第10题:
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
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
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.
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.
第11题:
The tag is invoked without a body.
The doTAb method throws an exception.
The
The tag is called with the attribute skip-body=true
第12题:
The doStartTag method is called once.
The doAfterBody method is NOT called.
The EVAL_PAGE constant is a valid return value for the doEndTag method.
The SKIP_PAGE constant is a valid return value for the doStartTag method.
The EVAL_BODY_BUFFERED constant is a valid return value for the doStartTag method.
第13题:
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?()
第14题:
Under what two circumstances is the set JspBody method NOT called in a tag class that implements the Simple Tag interface? ()
第15题:
第16题:
Assume the tag handler for a st:simpletag extends SimpleTagSupport. In what way can scriptlet code be used in the body of st:simple?()
第17题:
The sl:shoppingList and sl:item tags output a shopping list to the response and are used as follows:
第18题:
Tag files can only be accessed using a tagdir attribute.
The sort.jsp page translates successfully and invokes the tag defined by beta.tag.
The sort.jsp page produces a translation error because a taglib directive must always have a uriattribute.
Tag files can only be placed in /WEB-INF/tags, and NOT in any subdirectories of /WEB- INF/tags.
The tagdir attribute in line 2 can be replaced by a uri attribute if a TLD referring to beta.tag is createdand added to the web application.
第19题:
Set the body content type to JSP in the TLD
Scriptlet code is NOT legal in the body of st:simple
Add scripting-enabled= “true” to the start tag for the st:simple element
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.
第20题:
The do After Body method is called.
The doEnd Tag method is NOT called.
The type attribute may be specified in the TLD
The do Start Tag Method must always return SKIP_BODY.
The TLD for this tag must NOT include a
第21题:
public void doTag() {JspTag docTag = findAncestorWithClass(this, DocumentTag.class); ((DocumentTag)docTag).addCitation(this.docID);}
public void doStartTag() {JspTag docTag = findAncestorWithClass(this, DocumentTag.class); ((DocumentTag)docTag).addCitation(this.docID);}
public void doTag() {. Tag docTag = findAncestor(this, DocumentTag.class); . ((DocumentTag)docTag).addCitation(this.docID);. }
public void doStartTag() {. Tag docTag = findAncestor(this, DocumentTag.class); . ((DocumentTag)docTag).addCitation(this.docID);. }
第22题:
The do Start Tag method is called once.
The do After Body method is NOT called.
The EVAL_Page constant is a valid return value for the do End Tag Method.
the EVAL_BODY_BUFFERED constant is a valid return value for the do Start Tag method.
第23题:
The doStartTag method is called once.
The doAfterBody method is NOT called.
The EVAL_PAGE constant is a valid return value for the doEndTag method.
The SKIP_PAGE constant is a valid return value for the doStartTag method.
The EVAL_BODY_BUFFERED constant is a valid return value for the doStartTag method.