//How to make an Ajax request from html to servlet. //NOTE: Found is a variable in Servlet: public void doGet(HttpRequest request, HttpResponse response) throws Exception{ String element = request.getParameter("element"); //TODO check the element Does it found in db or not? boolean found = db.check(); response.getWriter().write(found); }