• Post Reply Bookmark Topic Watch Topic
  • New Topic

EL syntax (dot opetaror etc)

janne jounivich
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am little of confused of a couple of things concerning EL...Well, I can understand it has been developed to be very flexible (in order not to burden the user with rec. error pages) and that Java syntax should be forgotten but still I will need clarifications for few things.

1) on page 368 (HFS) it was said about the usage of dot operator. In case of java.util.Map or Bean being the first thing on the left...as follows
${first.second} then the second thing on the right must start with letter, dollar sign or underscore and must not start with number (the first.n23 is thereby possible) or with Java key words (as I understand these keywords could be something like public, int, this etc). However, according to my tests, it was possible to say in ${first.this} or ${first.public} once they're (f.ex as Maps) correctly stored into xx scope. I didn't find any information about this on HFS errata pages. ?? What do you think about this?

2) Second thing bothering is the behaviour of EL when there are unknown or null in (arithmetic or logical) EL expression. Like if there is not defined attribute "xxx" in xx scope, then EL considers it as null and with arithmetic expressions as zero. So far I can basically understand but as for logical expressions ${foo < 3} (supposedly foo is not defined so resulting false)I cannot get the point. How (false < 3) el expresssion be calculated?

Pls do give me some hints in order to understand EL better
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!