You are trying to call a java method in HTML/JSP.
This cannot be done.
When you write a JSP, and "access" it in a browser, the server (like Tomcat) will "process" the JSP and pass the "output" to the browser. The browser sees only HTML/CSS/Javascript and no java code.
The onclick is called by the browser, so the java method cannot be called here.
You need to submit the form to servlets - something like "pass control to servlets" and from there you can call java methods..
Write a servlet. In the onclick event, submit the form. And follow Bozho's advice. (As he said, please read some tutorial on Servlets)
EDIT:
BTW, the exception you had mentioned is NOT because of this. There is something else wrong. And to find out what is wrong, we need more details from you. Apart from the JSP what else do you have? Read the complete exception stack trace. Does it mention any of your classes?