This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
You're right that requestScope[integer] will evaluate to null, but EL is very forgiving in its handling of null values. You'll see on HFSJ page 395 it says "In logical expressions, EL treats the null value as 'false'". That's why the whole expression you gave will evaluate to false.
requestScope["interger"] evaluates to 3. The null value occurs because "integer" is not in quotes, so integer is evaluated (as "3"). Since there is no Map entry with "3" as a key, null is returned.
Based on the question it is possible "requestScope[interger]" was not the intended usage.
Joined: Jun 14, 2008
I believe I need to correct myself. If the integer attribute evaluates to a numeric value of 3, then requestScope[interger] is not a valid construct because such indexing is only valid for arrays and lists. As previously indicated, I believe requestScope["interger"] was the intended usage.
subject: Help me in EL expression question HFSJ Book page 393