• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question on EL

 
Parvathi G
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the following will produce compilation Error .

1. ${1+'1'}
2. ${varDoesntExist+1}
3 ${sessionScope*2}
4. ${2/varDoesntExists}
5. ${varDoesntExists1 <varDoesntExists2}
6. ${!true-!false}

I am thinking 4 and 5 will produce compilation error.
Please correct me if i am wrong.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
3 ${sessionScope*2} should nbot work, because sessionScope is an implicit object

6. ${!true-!false} should not work either.

JSP.2.3.5.1 Binary operators - A {+,-,*} B
� Otherwise coerce both A and B to Long and apply operator
� If operator results in exception, error

The others should be fine
[ January 23, 2006: Message edited by: Satou kurinosuke ]
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!