permaculture playing cards
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes HFSJ page 386-Not in errata Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "HFSJ page 386-Not in errata" Watch "HFSJ page 386-Not in errata" New topic

HFSJ page 386-Not in errata

Renu Radhika
Ranch Hand

Joined: Oct 21, 2005
Posts: 243
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é

Joined: Nov 24, 2005
Posts: 14688

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.

[My Blog]
All roads lead to JavaRanch
I agree. Here's the link:
subject: HFSJ page 386-Not in errata
jQuery in Action, 3rd edition