File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFSJ page 386-Not in errata

 
Renu Radhika
Ranch Hand
Posts: 243
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In HFSJ page 386,its mentioned that to get the values of a cookie named username using EL,we have to give ${cookie.userName.value}.Cant we get it using ${cookie.userName} like other objects?is the �.value� required?is it a mistake?
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cookie is an implicit object whose type is Map. It contains Cookie objects.
${cookie.userName} will return a Cookie. If you want its value, you'll have to call Cookie#getValue. So ${cookie.userName.value} is the right way to do it.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic