This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFSJ 1 Edition mock doubt

 
Poonam Agarwal
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Assuming this is a complete JSP, which is true?
(For options E and F, ignore the fact that an error in one line might keep a subsequent line from being reached)
A. Only line 2 will definitely generate an error.
B. Only line 3 will definitely generate an error.
C. Only line 4 will definitely generate an error.
D. Only line 5 will definitely generate an error.
E. Lines 4 and 5 will both definitely generate errors.
F. Lines 2, 3, 4 and 5 will all definitely generate errors.
G. The entire JSP could execute without generating any errors.

I got this question from HFSJ 1 edition mock. the given answer is in bold. I wonder if that would be the right answer. And I even shocked after reading the question that option C is not in the answer.??

<jsp:setProperty name=”x” property=”a” value=”b” /> in this line what is name="x" comes from. I guess question itself gives us a half knowledge.

please correct me

Thnaks in advance
 
sravanthi pulukuri
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi poonam,

even i felt the same.i thought answer would be C and D,because setProperty will work with UseBean only rite??
 
Sourin K. Sen
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Poonam Agarwal wrote:I wonder if that would be the right answer. And I even shocked after reading the question that option C is not in the answer.??

I think option E is the right answer as for line 4, <jsp:useBean> has to be used and for line 5 you need to declare a taglib directive for the core library of jstl. Without the core library directive, its not gonna work.

Please correct me if I am wrong...
 
Poonam Agarwal
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think option E is the right answer as for line 4, <jsp:useBean> has to be used and for line 5 you need to declare a taglib directive for the core library of jstl. Without the core library directive, its not gonna work.


sourin,

That's correct again. I guess question itself will definitely generate an error
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic