It is a very basic request-response test. Browser sends \"hello from browser\" to servlet using jQuery $.ajax API, and servlet receives this message, then create a JSON obje
<% Gson gs = new Gson(); BeanHelpBH bh = new BeanHelpBH(); List lst = bh.getTenbaihatbyName("Ao moi ca mau"); String bha = gs.toJson(lst); response.setContentType("application/json"); response.setCharacterEncoding("UTF-8"); out.print(bha); out.flush(); %> script :