protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, SQLException {
        DAO dao = new DAO();
        response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
        try {
            String tableName = request.getParameter("tableName");
            int result = dao.truncatetable(tableName);
            if (result == 0) {
                out.println("Table trunctated");
                response.setHeader("Refresh", "2;url=/websocchatroom/manageDatabase");

            } else {
                out.println("Error while Truncating table");
                response.setHeader("Refresh", "2;url=/websocchatroom/manageDatabase");
            }
        } finally {
            out.close();
        }
    }