i have a servlet where it fetches my data from MySQL, i forward the request to my JSP page, at the moment, i can't seem to fetch my data properly.
I can get my JSON String "listJ" just fine, but i am unable to assign it to a var "listJson". Can anyone advise me on the right way to fetch data, i will eventually need to implement AJAX and i think the only way forward is that the data has to be in JSON form in order to do that.
My previous issue is: Using Jquery Ajax on JSP to display on Datatables
listS = DBUtils.load(searchKey); .... String json = gson.toJson(listS); request.setAttribute("listS", json); request.getRequestDispatcher("WEB-INF/index.jsp").forward(request, response);