Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

cookies  RSS feed

 
sandeep Talari
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do we get cookies from EL
this is my question?

This is found in head first book
my understanding is cookies had property named userName and userName had val,isn't it ?
${cookies.userName.val}

Im confused explain me clearly.
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by sandeep Talari:
how do we get cookies from EL
this is my question?

This is found in head first book
my understanding is cookies had property named userName and userName had val,isn't it ?
${cookies.userName.val}

Im confused explain me clearly.


In this case, +cookies+ is a collection of Cookie objects (probably a version of the java.util.Map).

There is an item in the +cookies+ collection called +userName+, so this would indicate there being a Cookie with the Name of "userName".

A Cookie will have multiple different attributes assigned to it, one of which is the Value, which you get using the +val+ property.

The equivalent Java Code might be something like this:

[ July 29, 2008: Message edited by: Steve Luke ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!