I am new to learning Ajax and was wondering if I can call a Java class method directly in $.ajax()
call, like example below:
$.ajax({
url: "com.myPackage.MyClazz#myMethod()",
...
})
public class MyClazz {
public #returnType myMethod() {
....//mystuff
}
}
I have read this and this and plenty of posts and blogs on Ajax on the internet by now, but none of them seems to answer my question directly or indirectly.
It would be great if someone can only provide an example of what should i write in url parameter to call a server side Java method directly.