This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi Windows 2000 Professional with SP2 JDK1.3.0_02 with JavaMail(TM) API 1.2 release from Sun Tomcat 3.2
all code can be found in text format at http://ariel.mit-misys.com/javaranch I have a bean called MailBean.java. I have a JSP (transfer.jsp) that calls the sendMail method of this bean - the relevant part of the JSP is also posted at the above URL. The error message I get when running the JSP is: "Wrong number of arguments in method". As far as I can see, I have the correct number of arguments and datatypes passed as parameters. Can anyone tell me where I'm going wrong, please? Thank you. Clive [ April 12, 2002: Message edited by: Clive van Hilten ]
Well, a quick inspection doesn't reveal anything overt. Are you sure that it's the call to sendMail that the compiler is complaining about? You might want to post the complete text of the error message as a clue. An unrelated question (to be ignored if you don't appreciate unsolicited advice on your code): since sendMail is a static method, why do you bother instantiating a bean rather than using a static call (a la ariel.MailBean.sendMail())? Also, is what you posted a complete class? The only methods that actually do anything are static and don't reference the member variables at all. (Or is this just an incomplete work in progress?) hth, bear