AJAX call function

i have all my functions in a java class file....how do i call the function using ajax? does anyone know?thx
[121 byte] By [mela] at [2007-10-2 21:16:26]
# 1
izzit possible to call the java function from the class file by ajax? plz let me know if u know...quite urgent...thx very much..
mela at 2007-7-14 0:24:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
the page you are calling will be the one to call the class file.. haven't tried that part yetMessage was edited by: jgalacambra
jgalacambraa at 2007-7-14 0:24:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
yes, its correct. oh i see. does anyone knows how to do so?my jsp page is server side jsp page that have ajax will POST data back to server and call the function from the java class file, after that return the processed info back to the jsp page.
mela at 2007-7-14 0:24:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

this reply is what i get from SitePoint forum

to call a function of the java of the server-side from java scriopt. In this case you can use

1) XMLHTTP object to invoke the JSP/ACTION/SERVLET of the server trhough client side.

2) pass the value to that request.

3) get the response and dispaly it on the page.

any idea on that?

mela at 2007-7-14 0:24:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

Have you considered using DWR for your AJAX calls. It's a very simple open source framework for implementing AJAX into your Java Web application. One of the benefits of using DWR is easy browser compatibility, the framework will generate most of the client side javascript for you, all you have to do is define your java classes in the dwr.xml, and define the dwr servlet in your web.xml.

I highly recommend using DWR for your AJAX calls.

http://getahead.ltd.uk/dwr/overview/dwr

BAGAGT1a at 2007-7-14 0:24:37 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
The procedure to send a request and process the response is explained in Ajax tutorial. http://www.regdeveloper.co.uk/2006/06/09/ajax_web_tutorial/ http://www.regdeveloper.co.uk/2006/06/20/ajax_web_tutorial_part2/
dvohra09a at 2007-7-14 0:24:37 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...