aspose file tools*
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
Author

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é
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: HFSJ page 386-Not in errata