A
The echo tag handler must define the setAttribute (String key, String value) method
The
The class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.IterationTag interface
The class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.DynamicAttributes interface
第1题:
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?()
第2题:
If you want to use the Java EE platform’s built-in type of authentication that uses a custom HTML page for authentication. Which two statements are true?()
第3题:
Which statement is true if the do Start Tag method returns EVAL_BODY_BUFFERED?()
第4题:
Given in a single JSP page: <%@ taglib prefix=’java’ uri=’myTags’ %> <%@ taglib prefix=’JAVA’ uri=’moreTags’ %> Which two are true?()
第5题:
Assume the tag handler for a st:simpletag extends SimpleTagSupport. In what way can scriptlet code be used in the body of st:simple?()
第6题:
Which the two are true about the JSTL core iteration custom tags?()
第7题:
Every
A
A given tag can apply to only one
A given
It is possible to construct a valid
第8题:
A
The echo tag handler must define the setAttribute (String key, String value) method
The
The class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.IterationTag interface
The class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.DynamicAttributes interface
第9题:
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
第10题:
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);. }
第11题:
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.
第12题:
<prefix:myTag a=foo b=bar c=baz />
<prefix:myTag attributes={foo,bar,baz} />
<prefix:myTag jsp:attribute a=foo b=bar c=baz />
<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>
第13题:
Given the Tag:
第14题:
Under what two circumstances is the set JspBody method NOT called in a tag class that implements the Simple Tag interface? ()
第15题:
第16题:
A custom tag is defined to take three attributes. Which two correctly invoke the tag within a JSP page?()
第17题:
Which two are true concerning the objects available to developers creating tag files?()
第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题:
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.
第20题:
The prefix ’java’ is reserved.
The URI ’myTags’ must be properly mapped to a TLD file by the web container.
A translation error occurs because the prefix is considered identical by the web container.
For the tag usage
第21题:
The session object must be declared explicitly.
The request and response objects are available implicitly.
The output stream is available through the implicit outStream object.
The servlet context is available through the implicit servletContext object.
The JspContext for the tag file is available through the implicit jspContext object.
第22题:
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.
第23题:
The tag is invoked without a body.
The doTAb method throws an exception.
The
The tag is called with the attribute skip-body=true
第24题:
Your deployment descriptor will need to contain this tag: CUSTOM.
The related custom HTML login page must be named loginPage.html.
When you use this type of authentication, SSL is turned on automatically.
You must have a tag in your deployment descriptor that allows you to point to both a login HTML pageand an HTML page for handling any login errors.
In the HTML related to authentication for this application, you must use predefined variable names fort he variables that store the user and password values.