Tất cả câu hỏi
Ngân hàng câu hỏi trắc nghiệm có giải thích chi tiết.
doPost(HttpServletRequest request, HttpServletResponse response)doPut(HttpServletRequest request, HttpServletResponse response)doGet(HttpServletRequest request, HttpServletResponse response)doDelete(HttpServletRequest request, HttpServletResponse response)Đáp án đúng: "Using the <select> element". Danh sách chọn trong form HTML được dựng bằng phần tử select, mỗi mục là một thẻ option bên trong và giá trị gửi về server là thuộc tính value của mục đang chọn, đọc ở servlet bằng request.getParameter() với tên chính là thuộc tính name của select. "Using the <dropdown> element" sai vì HTML không có phần tử nào tên dropdown, trình duyệt sẽ coi nó là thẻ lạ và không vẽ ra ô chọn nào. "Using the <list> element" cũng không tồn tại; các phần tử danh sách của HTML là ul, ol và li, chúng chỉ để trình bày nội dung và không gửi dữ liệu theo form. "Using the <options> element" sai ở dạng số nhiều: thẻ con hợp lệ bên trong select là option, và bản thân nó cũng không thay được phần tử chứa bên ngoài.
request.setAttribute("data", "value");
response.sendRedirect("result.jsp");stmt.getAffectedRows()stmt.countRows()stmt.getRowCount()stmt.executeUpdate()HttpSessionListenerHttpSessionAttributeListenerServletContextListenerServletRequestListenerrequest.newSession(true)request.getSession(true)request.getHttpSession()sessionManager.get()StatementPreparedStatementCallableStatementResultSetinitFilter()initialize()init()setupFilter()contextInitialized()contextCreated()initContext()initializeContext()