What are the options for simple Ajax calls for a Java webapp?

Posted by Cedric Martin on Programmers See other posts from Programmers or by Cedric Martin
Published on 2011-11-20T17:11:27Z Indexed on 2011/11/20 18:24 UTC
Read the original article Hit count: 515

Filed under:
|
|
|
|

I've got a very simple need and I don't know what are the options available.

If I simplify, users see webpage like this server by a Java webapp server:

[-] red
[x] green
[-] blue
[-] yellow

The selected color is green

And then I want the user to be able to select the yellow color and have the part of the page containing the relevant text change to:

[-] red
[-] green
[-] blue
[x] yellow

The selected color is yellow

Basically I want something a bit more user friendly than simply using HTTP GET all the time. There shall be a lot of options the user can select from and this shall affect an (HTML formatted) text displayed on the page. And I want the user to see his change as soon as possible, without having the page to fully reload and without being redirected to another page. There shall be a client/server round-trip (the information to display depending on the options selected ain't available on the client-side so I cannot do it all in JavaScript in the browser).

I'd like to use Ajax requests but I don't know which way to go:

  • jQuery

  • GWT

  • something else

What are my options and what would be the pros and cons of the various approach?

P.S: I'm very familiar with Java (SCP since the last century and basically being a Java programmer for the last 12 years or so) but not familiar at all with JavaScript (though I did hack a few Ajaxy-calls years ago, way before great libraries existed).

© Programmers or respective owner

Related posts about java

Related posts about jQuery