11349 0 Newbie Poster

Hi All,
Hope your all well
Im really new to the world of JSP & AJAX,
my question is, I need to retrive names from a database and present them to a user on a JSP form,
but I shouldnt show any database interaction on the client end,
So as far as Ive managed to work out so far, ill need a AJAX HTTP send request to initiate the collection of names, this send request should call a JSP function to connect and gather the names and store them in an array.
then the JSP page should return the array to the respond request initiated by AJAX.

Am I on the right path here guys? if anyone could provide a really simple example code to demonstrate I would really appreciate it. I have looked at code already here but it would seem that the database connection is made on the client, I understood that to be bad practice?

if im wrong int hat too let me know so I dont waste any more time and can use that example

Kind regards

Rob

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.