具体开发Servlet类时需继承HttpServlet类,HttpServlet类又是GenericServlet类的子类,GenericServlet类则实现Servlet接口。
查看答案
实际开发的Servlet类通常重载Servlet生命周期的init()、service()和destroy()方法,其中service()方法通常根据客户端请求类型为GET或POST,相应地转化为doGet()或doPost()方法。
A. 对
B. 错
Servlet源程序都不包含main()方法。
A. 对
B. 错
javax.servlet.http.HttpServletResponse对象的getCookies()方法返回客户请求中的所有Cookie信息。
A. 对
B. 错
ServletAPI的RequestDispatcher转发时会产生新的请求对象。
A. 对
B. 错