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.

HFSJ page 386-Not in errata

Renu Radhika

Ranch Hand

Posts: 243

posted 9 years ago

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?

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.