I have a Java program, and it needs to listen for and handle requests sent to it via AJAX and respond.
Are there any libraries that handle this? If not how would I handle this myself with sockets?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Ajax works on the http protocol and to handle the call, something such as a webserver would be required. The below links describe about few java servers:
http://www.jibble.org/miniwebserver/
http://jetty.codehaus.org/jetty/
The following link has the complete code of implementation from the scratch if you would like to:
http://fragments.turtlemeat.com/javawebserver.php