Java | Answer them all 8. It is possible to display an attribute with a string v
ID: 3718075 • Letter: J
Question
Java | Answer them all
8. It is possible to display an attribute with a string value in multiple rows using the <c:forEach> tag.
(a) true
(b) false
9. When we use the EL expression to display the value of an attribute, we want to provide the default value when the attribute is null. Which of the following ways should we use?
(a)Use the EL expression directly
(b)Use the<c:out> tag
(c)Use the <c:set>tag
(d)Use the<c:if>tag
10. Which of the following can NOT be used as the value of the items in the <c:foreach>
tag which is interpreted as multiple items?
(a)an array of objects
(b)a List of objects
(c)a Map of objects
(d) a comma-delimited string
(e)a space-delimited String
11. If you remove an attribute by the <c:remove> tag without specifying the scope, then only the attribute in the
page scope of that variable is removed.
(a)true
(b)false
12. Which of the following EL expressions NEVER throws an exception?
(a)${mybean.myval}
(b)<c:set var="mybean" value="${myval}" />
(c)<c:set target="${mybean}" property="myprop" value="${myval}" />
13. Which of the following ways of include can add content of a resource from outside
of the web container?
(a)the JSP include directive
(b)the JSP include action
(c)the JSTL<c:import>tag
14. Can we use the following way to set the value of an attribute in a JSP?
<c:set var="myvar" value="<c:out value=’${myvalue}’ />" />
(a)yes
(b)no
Explanation / Answer
8. (a) true
9. (d)Use the<c:if>tag
10. (c)a Map of objects
11. (b)false
12. (b)<c:set var="mybean" value="${myval}" />
13. (c)the JSTL<c:import>tag
14. (a)yes
**Comment for any further queries.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.