A. setParameter()和getParameter() B. setAttributer()和getAttribute() C. addAttributer()和getAttribute() D. set()个get()
A. init() B. main() C. service() D. doGet()
A. service() B. init() C. doPost() D. destroy()
A. 加载类,实例化,请求处理,初始化,销毁 B. 加载类,实例化,初始化,请求处理,销毁 C. 实例化,加载类,初始化,请求处理,销毁 D. 加载类,初始化,实例化,请求处理,销毁
A. 必须是HttpServlet的子类 B. 通常需要覆盖doGet() 和doPost()方法或其一 C. 通常需要覆盖service()方法 D. 通常要在web.xml文件中声明<servlet>和<servlet-mapping>两个元素
A. 构造方法只会调用一次 B. init()方法只会调用一次 C. service()方法在每次请求此Servlet时都会被调用 D. destroy()方法在每次请求完毕时会被调用。
A. PHP B. ASP C. JavaScript D. JSP
A. getSession() B. getSession(Boolean) C. getRequestSession(); D. getHttpSession();
A. 调用HttpSession的close方法 B. 调用HttpSession的invalidate()方法 C. 等待HttpSession超时 D. 调用HttpServletRequest的getSession(false)方法
A. 一个应用对应一个ServletContext B. ServletContext的范围比Session的范围要大。 C. 第一个会话在ServletContext中保存了数据,第二个会话读取不到这些数据 D. ServletContext使用setAttributer()和getAttribute()方法操作数据。