• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EL function with parameter

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi i am using an EL function with double parameter. but getting exception

"Comma expected for expression language function abc rollDice"


please help me to find where i am wrong.
---------------------------------------------------------------------------
Code-----

Jsp:-

<%@ taglib uri="DiceFunctions" prefix="mine"%>

${mine:rollIt(2)}

---------------------------------------------------------------------------
CLASS:-


package beans;

public class DiceRoller {

public static double rollDice(double i){
return Math.abs(i);
}
}
----------------------------------------------------------------------
TLD:-

<short-name>abc</short-name>
<uri>DiceFunctions</uri>

<function>
<name>rollIt</name>
<function-class>beans.DiceRoller</function-class>
<function-signature>double rollDice(double i)</function-signature>
</function>
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Amit",
You may not be aware of the ranch Naming Policy. Please read it carefully and change your name accordingly (you need to set both first and last names). Thank you.
 
Amit Sharma
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have changed "Amit" to "Amit Sharma"
 
Ranch Hand
Posts: 433
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Amit:

TLD:-

<short-name>abc</short-name>
<uri>DiceFunctions</uri>

<function>
<name>rollIt</name>
<function-class>beans.DiceRoller</function-class>
<function-signature>double rollDice(double i)</function-signature>
</function>



change it to:

<function-signature>double rollDice(double)</function-signature>
 
A "dutch baby" is not a baby. But this tiny ad is baby sized:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic