Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Epractice Lab review exam 3 about <c:set>

 
Himai Minh
Ranch Hand
Posts: 1398
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Which of the JSTL fragments in the choices are similar to the following
code fragment?
<%String productName ="Training Lab";
pageContext.setAttribute(productName);%>

choose three
a.<c:set var="name" scope="page" value="Training Lab"/>
b.<c:set var="name" scope="page" default="" value="Training Lab"/>
c.<c:set var="name" scope="page" value="Training Lab"></c:set>
d. <c:set var="name"> Training Lab</c:set>
e. <c:set var="name scope="page"> Training Lab</c:set>
f. <c:set var='name' scope="page">${trainingLab}</c:set>
Given answer : A, C,D


I think E is one of the option too.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Posts: 2778
174
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In 'e' there is a closing quote missing:
"name scope
 
Himai Minh
Ranch Hand
Posts: 1398
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did not type the " by mistake.
But in the real question it is like this:<c:set var="name" scope="page"> Training Lab</c:set>.
I believe this is one of the options.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!