A. req.getSession() B. req.getSession(false) C. req.getSession(true) D. req.createSession()
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");