This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Java SE 8 Programmer II Exam Study Guide and have Kathy Sierra, Bert Bates, & Elizabeth Robson on-line!
See this thread for details.
Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

head first servlets and jsp - page 420 - Q6  RSS feed

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On Page 420
Question 6
option F. ${list[list['listIdx']]} is show as correct.

Don't see how.
Option F should be ${list[list[listIdx]]} to be correct (no quotes around listIdx).
Thanks
Satguru
 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Satguru,

I agree. I just tried it and got the following:

javax.servlet.ServletException: The "[]" operator was supplied with an index value of type "java.lang.String" to be applied to a List or array, but that value cannot be converted to an integer


I checked on the errata pages and it's not there yet, so I've just logged it via:
http://www.oreilly.com/catalog/headservletsjsp/errata/

[ October 17, 2004: Message edited by: Roger Yates ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!