• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

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>
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic