Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing a primitive to an EL function  RSS feed

 
William Asher
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried the example EL function on page 393 of Head First Servlets and JSP, and it worked OK. Then the book mentions that these functions can have arguments (fully qualified class names for objects, and unqualified names for primitives). I tried modifying the example to test that, and got a Jasper exception: Method "rollDice" for function "rollIt" not found in class "com.example.model.DiceRoller". Why?

Here is the code that did not work (includes an "int" function argument):

myFunc.tld:


result.jsp:


DiceRoller.java


Here is the code that did work:
myFunc.tld:


result.jsp:


DiceRoller.java


For completeness, I also tried the above with a class parameter to the function (java.util.Map), and I got the same Jasper exception - so my problem probably has nothing to do with passing the primitive. Any ideas? Thanks.
 
William Asher
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please disregard! The problem was that I forgot to stop and restart Apache. Good day!
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!