Results 1 to 10 of 10
  1. #1
    JR666 is offline Member
    Join Date
    Sep 2011
    Posts
    6
    Rep Power
    0

    Default Ajax and java jdk

    Hi Guys and Gals,

    I have used java script a lot but want to develop a java application that needs to use ajax to get information does anyone know of an ajax example for a java application i can study as all i can find on the web are examples of java script :(

    Thanks

  2. #2
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    618
    Rep Power
    4

    Default Re: Ajax and java jdk

    Hi. I want to ask you another question. if you say that you use js what server language do you use together with js?

    PS What is Gals?

    update :
    I found myself it means gallons which is used in volume measurement or women depending on the context. ))
    Last edited by Petr; 09-22-2011 at 01:12 PM.
    Skype: petrarsentev
    http://TrackStudio.com

  3. #3
    JR666 is offline Member
    Join Date
    Sep 2011
    Posts
    6
    Rep Power
    0

    Default Re: Ajax and java jdk

    Hi,

    My java script has all been client side for additions to firefox and chrome..

    The Java application i am looking to run on a server and to develop an android application as well

    ps. Gals = Girls ... lol

    Thanks for your reply :)

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,820
    Rep Power
    19

    Default Re: Ajax and java jdk

    AJAX is mostly (to be honest) client side.
    It uses Http to talk to the server, so the Java on there is not really any different to a normal web app (Servlets).
    The thing you need to sort out is what you;re sending to and from the server. Responses will usually be JSON strings, since there's lots of useful Javascript stuff for handling them, and there's a good JSON package for Java as well. Requests can be whatever you want, and are largely dependent on what it is that particular request is supposed to do.

  5. #5
    JR666 is offline Member
    Join Date
    Sep 2011
    Posts
    6
    Rep Power
    0

    Default Re: Ajax and java jdk

    Hi,

    at the moment I have a javascript add on to chrome that works. It sends the ajax request gets the info i need and then sends it back with another ajax response saving hours of key presses. Problem i get is that I want to run it 24/7 on a server as the transfer is not complex.. it being a case of checking some of the json response to see if it needs forwarding.

    But i ca find no references to using ajax requests in this situation.. I dont want the memory overhead of running a browser on the server as it is a linux server with no user display.


    Thanks

  6. #6
    JR666 is offline Member
    Join Date
    Sep 2011
    Posts
    6
    Rep Power
    0

    Default Re: Ajax and java jdk

    would be happy to see just one code example of how to send an ajax request please :)

    I know how to send a standard http request

  7. #7
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,820
    Rep Power
    19

    Default Re: Ajax and java jdk

    Ah, so it's not a browser thing.

    You could use URLConnection to fire them off (or Apache's HttpClient might be better) and pick up the responses all in Java.

  8. #8
    JR666 is offline Member
    Join Date
    Sep 2011
    Posts
    6
    Rep Power
    0

    Default Re: Ajax and java jdk

    I was hoping to use the URLConnection to fire them .. have done it so i can echo a standard site page to the console but i cant work out how to format it for the ajax request :(

  9. #9
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,820
    Rep Power
    19

    Default Re: Ajax and java jdk

    An Ajax request is simply a normal Http request.
    What you need to send (and what you can expect back) are all dependent on what the server is expecting.

  10. #10
    JR666 is offline Member
    Join Date
    Sep 2011
    Posts
    6
    Rep Power
    0

    Default Re: Ajax and java jdk

    lol....

    so thats why it did not make sense :) thanks for the info i will sort out what i am presently sending with the java script and use that as data..

    simple when you know how
    thanks

Similar Threads

  1. Replies: 0
    Last Post: 09-14-2011, 06:32 PM
  2. Web Developer Java Ajax UI to 55k Home Based Berkshire
    By Mike-Brown in forum Jobs Offered
    Replies: 1
    Last Post: 04-22-2011, 08:17 AM
  3. Populate select list with Java/Ajax
    By Jeremy720 in forum JavaServer Pages (JSP) and JSTL
    Replies: 3
    Last Post: 04-20-2011, 03:14 PM
  4. Java Developer AJAX/XHTML/Javascript Milton Keynes
    By ICResourcing in forum Jobs Offered
    Replies: 0
    Last Post: 11-09-2009, 12:04 PM
  5. JAVA, Ajax, Flash
    By Digital Dispatching in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 02-06-2008, 07:49 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •