Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling a function with 2 arguments

 
Chanpreet Julka
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JSP which calls a function that passes 2 arguments. The function is defined in bean.
The function is defined like this
public void getNextAntenna(String antType , String antName) {
....
}
I call the function like this antBean.getNextAntenna(antType, antName);
(ant Bean is my Bean ID).
When i run the JSP, it tells me that I have the wrong number of arguments. Am I allowed to call a function like this in a JSP? Thanks
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see anything wrong with what you are doing. The function is expecting two parametsrs and you are passing the appropriate parameters right?
 
Michal Bienek
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try posting the trace you're getting. Is it from your webserver? At which point you may want to double check your compilation, make sure you have the most recent version of this jsp file deployed.
I agree with the previous posting in that nothing seems wrong in your description, so I have to assume that we don't have all the relevant info.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic