A. HttpSession通過HttpServletRequest對象獲得 B. HttpSession可以用來保存數(shù)據(jù),并實現(xiàn)數(shù)據(jù)的傳遞 C. HttpSession被創(chuàng)建后,將始終存在,直到服務停止 D. 調(diào)用HttpSession的invalidate()方法,可以刪除創(chuàng)建的HttpSession對象及數(shù)據(jù)
在Servlet中有如下代碼段: ... ... 那么能夠正確填寫在橫線處的選項是()。
A. dis = response.getRequestDispatcher("error.jsp"); B. dis = request.getRequestDispatcher("error.jsp"); C. dis = request .RequestDispatcher("error.jsp"); D. dis =new RequestDispatcher("error.jsp");
A. Servlet實例由Servlet容器負責加載和創(chuàng)建 B. Servlet容器調(diào)用init()方法初始化Servlet,每加載一次Servlet都會執(zhí)行一次init()方法 C. Servlet初始化完畢后,就處于能響應請求的就緒狀態(tài) D. Servlet的destroy()方法指明哪些資源可以被系統(tǒng)回收