I am creating a jsp application in Netbeans Ide. I am having problems in calling a java class method in ajax.Is it possible to do so
My java class is something like
You cannot call the method directly. You should map an URL to the method you want to call. This can be done in a servlet. If you're already serving pages through your Java code, you just add a new method to serve a page with the content you want.