10 sample questions about Dynamic Attributes (CX-310-083)

778
-1

Published on

10 sample questions about Dynamic Attributes for exam CX-310-083.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
778
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

10 sample questions about Dynamic Attributes (CX-310-083)

  1. 1. Skillytaire 10 sample questions about Dynamic Attributes (CX-310-083)
  2. 2. 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
  3. 3. Question 1:Question 1: 3 Dynamic Attributes can be applied in: ServletsA JSPB Tag FileC Classic TagD Modern TagE Simple TagF Every class that implements javax.servlet.jsp.tagext.JspTagG
  4. 4. Question 1:Question 1: 4 Dynamic Attributes can be applied in: ServletsA JSPB Tag FileC Classic TagD Modern TagE Simple TagF Every class that implements javax.servlet.jsp.tagext.JspTagG
  5. 5. 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.DynamicAttributesA you must add dynamic-attributes to the tag directiveB implement the interface javax.servlet.jsp.tagext.DynamicAttributesC Add <dynamic-attributes>true</dynamic-attributes> in the tldD You must configure the tld in the web.xml in jsp-config sectionE
  6. 6. 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.DynamicAttributesA you must add dynamic-attributes to the tag directiveB implement the interface javax.servlet.jsp.tagext.DynamicAttributesC Add <dynamic-attributes>true</dynamic-attributes> in the tldD You must configure the tld in the web.xml in jsp-config sectionE
  7. 7. Question 3:Question 3: 7 Dynamic Attributes must be configured in the TLD of the tag: TrueA FalseB
  8. 8. Question 3:Question 3: 8 Dynamic Attributes must be configured in the TLD of the tag: TrueA FalseB
  9. 9. 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
  10. 10. 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
  11. 11. 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
  12. 12. 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
  13. 13. 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>D An exception will be throw at runtimeE None of the aboveF
  14. 14. 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>D An exception will be throw at runtimeE None of the aboveF
  15. 15. 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>D An exception will be throw at runtimeE None of the aboveF
  16. 16. 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>D An exception will be throw at runtimeE None of the aboveF
  17. 17. 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.DynamicAttributesA you must add dynamic-attributes to the tag directiveB implement the interface javax.servlet.jsp.tags.DynamicAttributesC Add <dynamic-attributes>true</dynamic-attributes> in the tldD You must configure the tld in the web.xml in jsp-config sectionE
  18. 18. 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.DynamicAttributesA you must add dynamic-attributes to the tag directiveB implement the interface javax.servlet.jsp.tags.DynamicAttributesC Add <dynamic-attributes>true</dynamic-attributes> in the tldD You must configure the tld in the web.xml in jsp-config sectionE
  19. 19. 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.DynamicAttributesA you must add dynamic-attributes to the tag directiveB implement the interface javax.servlet.jsp.tagext.DynamicAttributesC Add <dynamic-attributes>true</dynamic-attributes> in the tldD You must configure the tld in the web.xml in jsp-config sectionE
  20. 20. 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.DynamicAttributesA you must add dynamic-attributes to the tag directiveB implement the interface javax.servlet.jsp.tagext.DynamicAttributesC Add <dynamic-attributes>true</dynamic-attributes> in the tldD You must configure the tld in the web.xml in jsp-config sectionE
  21. 21. 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"/> 0A 1B 2C 3D 4E
  22. 22. 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"/> 0A 1B 2C 3D 4E

×