Originally posted by maih fhil: How come now we can get the value for mainEmail without using .value
EL sees that initParam is a map and so the method it calls is something like initParam.get("name"), which returns the value in the map that is associated with the key of "name".
OK, OK, I know this seems to contradict what's happening with Cookies. The Cookie map is a little different though. The initParam map is a <String, String> while the cookie map is a <String, Cookie>. That means the cookie map returns you a Cookie object.
Check out the Cookie API. Note that it has a method called getValue() that returns the internal String value. The .value in your EL calls this method so what gets displayed in the browser is the value of the Cookie. Otherwise, my guess is you'll get a weird Cookie object reference printed out like Cookie@abracadabra which wouldn't be terribly helpful. [ November 30, 2007: Message edited by: Marc Peabody ]