wood burning stoves 2.0*
The moose likes JSP and the fly likes Calling a function with 2 arguments Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Calling a function with 2 arguments" Watch "Calling a function with 2 arguments" New topic
Author

Calling a function with 2 arguments

Chanpreet Julka
Ranch Hand

Joined: Nov 09, 2001
Posts: 40
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

Joined: Nov 06, 2000
Posts: 1510
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?


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Michal Bienek
Greenhorn

Joined: Jun 17, 2002
Posts: 29
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.
 
 
subject: Calling a function with 2 arguments
 
Similar Threads
Where is main function defined in Java API
Return a List or Array from an EL function results in exception
how to calculate number of arguments in a function
How to call JavaScript Function from jsp
Progress bar in a JSP onClick event