Upload
mtstorm
View
720
Download
1
Tags:
Embed Size (px)
DESCRIPTION
10 sample questions about Dynamic Attributes for exam CX-310-083.
Citation preview
Skillytaire10 sample questions about Dynamic Attributes (CX-310-083)
Tems of useTems of use
2
You may use this document for your own purpose only if you leave the document as is.
© Copyright 2010 Prolector.
For more information please visit http://www.prolector.nl
You may use this document for your own purpose only if you leave the document as is.
© Copyright 2010 Prolector.
For more information please visit http://www.prolector.nl
Question 1:Question 1:
3
Dynamic Attributes can be applied in:
ServletsAJSPBTag FileCClassic TagDModern TagESimple TagFEvery class that implements javax.servlet.jsp.tagext.JspTagG
Question 1:Question 1:
4
Dynamic Attributes can be applied in:
ServletsAJSPBTag FileCClassic TagDModern TagESimple TagFEvery class that implements javax.servlet.jsp.tagext.JspTagG
Question 2:Question 2:
5
In order to have dynamic attribues working for a tag file you need to do the following:
implement the interface javax.servlet.jsp.tags.DynamicAttributesAyou must add dynamic-attributes to the tag directiveBimplement the interface javax.servlet.jsp.tagext.DynamicAttributesCAdd <dynamic-attributes>true</dynamic-attributes> in the tldDYou must configure the tld in the web.xml in jsp-config sectionE
Question 2:Question 2:
6
In order to have dynamic attribues working for a tag file you need to do the following:
implement the interface javax.servlet.jsp.tags.DynamicAttributesAyou must add dynamic-attributes to the tag directiveBimplement the interface javax.servlet.jsp.tagext.DynamicAttributesCAdd <dynamic-attributes>true</dynamic-attributes> in the tldDYou must configure the tld in the web.xml in jsp-config sectionE
Question 3:Question 3:
7
Dynamic Attributes must be configured in the TLD of the tag:
TrueAFalseB
Question 3:Question 3:
8
Dynamic Attributes must be configured in the TLD of the tag:
TrueAFalseB
Question 4:Question 4:
9
Choose the correct directive for a tag file that should use dynamic attributes:
<%@ tag body-content="empty" dynamic-attributes="dynamicAttributes" %>A<%@ tag body-content="empty" dynamic-attribute="dynamicAttributes" %>B<%@tag body-content="empty" dynamic-attributes="variables" %>C<%@tag body-content="empty" dynamic-attribute="variables" %>D
Question 4:Question 4:
10
Choose the correct directive for a tag file that should use dynamic attributes:
<%@ tag body-content="empty" dynamic-attributes="dynamicAttributes" %>A<%@ tag body-content="empty" dynamic-attribute="dynamicAttributes" %>B<%@tag body-content="empty" dynamic-attributes="variables" %>C<%@tag body-content="empty" dynamic-attribute="variables" %>D
Question 5:Question 5:
11
If an tag is declared in a tld, which xml child element of tag should be placed to enable dynamic properties:
<auto-attributes>true</auto-attributes>A<auto-wire>true</auto-wire>B<dynamic-attributes>true</dynamic-attributes>C<dynamic-attribute>true</dynamic-attribute>D<dynamic-properties>true</dynamic-properties>E
Question 5:Question 5:
12
If an tag is declared in a tld, which xml child element of tag should be placed to enable dynamic properties:
<auto-attributes>true</auto-attributes>A<auto-wire>true</auto-wire>B<dynamic-attributes>true</dynamic-attributes>C<dynamic-attribute>true</dynamic-attribute>D<dynamic-properties>true</dynamic-properties>E
Question 6:Question 6:
13
Given the following tag code:
<%@ tag body-content="empty" dynamic-attributes="dynatrs" %><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><table>
<c:forEach items="${dynattrs}" var="element"><tr>
<td>${element.key}</td><td>${element.value}</td>
</tr></c:forEach>
</table>what will the result be for <myTags:demo myAttribute="een waarde"/> ?
<table><tr><td>myAttribute</td><td>een waarde</td></tr></table>A<table><tr><td>een waarde</td><td>myAttribute</td></tr></table>B<table><tr><td></td><td></td></tr></table>C<table></table>DAn exception will be throw at runtimeENone of the aboveF
Question 6:Question 6:
14
Given the following tag code:
<%@ tag body-content="empty" dynamic-attributes="dynatrs" %><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><table>
<c:forEach items="${dynattrs}" var="element"><tr>
<td>${element.key}</td><td>${element.value}</td>
</tr></c:forEach>
</table>what will the result be for <myTags:demo myAttribute="een waarde"/> ?
<table><tr><td>myAttribute</td><td>een waarde</td></tr></table>A<table><tr><td>een waarde</td><td>myAttribute</td></tr></table>B<table><tr><td></td><td></td></tr></table>C<table></table>DAn exception will be throw at runtimeENone of the aboveF
Question 7:Question 7:
15
Given the following tag code:
<%@ tag body-content="empty" dynamic-attributes="dynattrs" %><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><table>
<c:forEach items="${dynattrs}" var="element"><tr>
<td>${element.key}</td><td>${element.value}</td>
</tr></c:forEach>
</table>what will the result be for <myTags:demo myAttribute="een waarde"/> ?
<table><tr><td>myAttribute</td><td>een waarde</td></tr></table>A<table><tr><td>een waarde</td><td>myAttribute</td></tr></table>B<table><tr><td></td><td></td></tr></table>C<table></table>DAn exception will be throw at runtimeENone of the aboveF
Question 7:Question 7:
16
Given the following tag code:
<%@ tag body-content="empty" dynamic-attributes="dynattrs" %><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><table>
<c:forEach items="${dynattrs}" var="element"><tr>
<td>${element.key}</td><td>${element.value}</td>
</tr></c:forEach>
</table>what will the result be for <myTags:demo myAttribute="een waarde"/> ?
<table><tr><td>myAttribute</td><td>een waarde</td></tr></table>A<table><tr><td>een waarde</td><td>myAttribute</td></tr></table>B<table><tr><td></td><td></td></tr></table>C<table></table>DAn exception will be throw at runtimeENone of the aboveF
Question 8:Question 8:
17
In order to have dynamic attributes working for a simple tag you need to do the following:
implement the interface javax.servlet.jsp.tagext.DynamicAttributesAyou must add dynamic-attributes to the tag directiveBimplement the interface javax.servlet.jsp.tags.DynamicAttributesCAdd <dynamic-attributes>true</dynamic-attributes> in the tldDYou must configure the tld in the web.xml in jsp-config sectionE
Question 8:Question 8:
18
In order to have dynamic attributes working for a simple tag you need to do the following:
implement the interface javax.servlet.jsp.tagext.DynamicAttributesAyou must add dynamic-attributes to the tag directiveBimplement the interface javax.servlet.jsp.tags.DynamicAttributesCAdd <dynamic-attributes>true</dynamic-attributes> in the tldDYou must configure the tld in the web.xml in jsp-config sectionE
Question 9:Question 9:
19
In order to have dynamic attributes working for a classic tag you need to do the following:
implement the interface javax.servlet.jsp.tags.DynamicAttributesAyou must add dynamic-attributes to the tag directiveBimplement the interface javax.servlet.jsp.tagext.DynamicAttributesCAdd <dynamic-attributes>true</dynamic-attributes> in the tldDYou must configure the tld in the web.xml in jsp-config sectionE
Question 9:Question 9:
20
In order to have dynamic attributes working for a classic tag you need to do the following:
implement the interface javax.servlet.jsp.tags.DynamicAttributesAyou must add dynamic-attributes to the tag directiveBimplement the interface javax.servlet.jsp.tagext.DynamicAttributesCAdd <dynamic-attributes>true</dynamic-attributes> in the tldDYou must configure the tld in the web.xml in jsp-config sectionE
Question 10:Question 10:
21
Given a simple tag that has configured in the tld only one attribute 'name' and has support for dynamic attributes. Given the following snippet how many time will the method setDynamicAttribute be invoked?
<myTags:dynamicSimpleTag myAttribute="een waarde" enNogEenAttribute="enz..." name="name"/>
0A1B2C3D4E
Question 10:Question 10:
22
Given a simple tag that has configured in the tld only one attribute 'name' and has support for dynamic attributes. Given the following snippet how many time will the method setDynamicAttribute be invoked?
<myTags:dynamicSimpleTag myAttribute="een waarde" enNogEenAttribute="enz..." name="name"/>
0A1B2C3D4E