Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

desperately Need help with EL....

 
Nikita Deshmukh
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a few doubts in EL

Is this alloed in EL : ${requestScope["foo"][foobar]}
Can it have two sets of square brackets ??

if you have have no other attrbute by the name of foo in the application then does this retrieve the attribute advice of foo
${foo.advice}

Also it cannot be
${request.foo.foobar}
but it has to be
${requestScope.foo.foobar}
right ??

And is this ok : ${requestScope[foo[foobar]]} ??

Niki
 
Radmika Arunachalam
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>> Is this alloed in EL : ${requestScope["foo"][foobar]}
>> Can it have two sets of square brackets ??

It is allowed in EL for ex: following code prints "test1"
<% request.setAttribute("foo", new String[] { "test", "test1", "test2" });
pageContext.setAttribute("foobar", "1");
%>
${requestScope["foo"][foobar]}

---------------

>> if you have have no other attrbute by the name of foo in the application then does this retrieve the attribute advice of foo
>> ${foo.advice}

It wont return anything. Prints empty.


Hope this helps...
Radmika
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic