Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Overloading an EL function defined in TLD

Tags:

jsp

el

Is it possible to overload(function name) an EL function? Please look at following piece of TLD:

Same function name rollDice

<function>  
<name>rollIt</name>  
<function-class>com.Person</function-class>  
<function-signature>int rollDice()</function-signature>  
</function>  

<function>  
<name>rollIt</name>  
<function-class>com.Person</function-class>  
<function-signature>int rollDice(int)</function-signature>  
</function> 
like image 863
Ankit Agarwal Avatar asked Oct 22 '22 02:10

Ankit Agarwal


1 Answers

No, EL functions do unfortunately not support method overloading (nor varargs). Give each function a different name.

like image 146
BalusC Avatar answered Oct 24 '22 02:10

BalusC