• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL Question

 
muthulingam Jayakanthan
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found one model EL question from yahoo group.

Q. A developer wants to use EL to invoke a function using
${my:bloof("foof")}.

Which is always true?

A. The method invoked by this function must be static
B. The function must be declared in a web.xml file using <function> element.
C. The function class must hav a method with the signature


I think B is correct, but there is a confusion with A. please discuss?
 
Nitish Bahadur
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A. The method invoked by this function must be static
Is Correct.

B. The function must be declared in a web.xml file using <function> element.
This is not correct. bloof might just be an alias to an actual method foo.

C. The function class must hav a method with the signature
I think this is incomplete.

<function>
<name>bloof</name>
<function-class>com.whatever.Samples</function-class>
<function-signature>int foo</function-signature>
</function>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic