In my ListCityServlet.java, in doPost(), I just write out the list of string like this:
PrintWriter out = response.getWriter();
out.write( cities );
When I entered any single charater, for example "m" on the <input type="text" id="location"/>. It displays whole string below in the autocomplete window ['Paris', 'New York', 'Milan', 'Stockholm', 'Melbourne', 'Montreal', 'Mexico', 'Los Angeles', 'San Francisco', 'London', 'Dubai', 'Madrid', 'Tokyo', 'Hong Kong', 'Sydney']
instead of a list of columns of Milan, Melbourne, Montreal.
I understand that my javaservlet the right String since I do not know what kind of right format of String my javaservlet code must return.
Thanks a lot for any of your comments and advices,