Best practise to read/write database records with Java/Ajax

We plan to use JSP/Java on the server side and Ajax to communicate with the server instantly.
Assume a drop down box which should be filled by database content.
What's the best way to read/write data from/to backend database? Short How-to's are welcome?
go4javaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

laurin1Commented:
Depends on what you are going to use it for. I use prototype for all my Ajax communication and scriptaculous for ajax drop-downs.
0
go4javaAuthor Commented:
Didn't know the Javascript Framework http://www.prototypejs.org/ and http://demo.script.aculo.us/ either, so thank you for these interesting links.
I need it for a simple admin form: Reading some data records from MaxDB via JDBC and filling dropdowns and other form fields.
0
drazen_nikolicCommented:
You should try DWR (http://getahead.org/dwr) "Direct Web Remoting - DWR allows Javascript in a browser to interact with Java on a server and helps you manipulate web pages with the results."

It is the powerful tool, which makes our JAVA developer life much easier, fighting with AJAX calls.
In short, you map your JAVA class in a DWR configuration file, and than in JavaScript you can call this JAVA class's method. Afterwards, the callback JavaScript (you have specified) is triggered with the responce - result from your JAVA class -e.g. list of Strings you will be able to put in your drop-down box, by using JavaScript. And all this is done using AJAX technology, but you do not have to know much about it. There is also a possibility to map not just simple JAVA objects, like String or Integer, but also any custom object with its attributes.

Check out http://getahead.org/dwr/getstarted and http://getahead.org/dwr/browser/intro for the start. There are also a lot of articles on the net with DWR examples.

Hope that this helps. Regard...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.