3 doGet() 和 doPost() 的区别?
第1题:
开发JavaWeb应用程序时,创建一个Servlet,该Servlet重写了其父类的doGet()和doPost()方法,那么其父类可能有( )
A、GenericServlet
B、ServletResponse
C、ServletRequest
D、HttpServlet
第2题:
什么情况下调用doGet()和doPost()?
Jsp 页面中的FORM. 标签里的method 属性为get 时调用doGet(),为post 时调用
doPost()。
第3题:
A.Stringstr=request.getAttribute("jb");
B.Stringstr=(String)request.getAttribute("jb");
C.Objectstr=request.getAttribute("jb");
D.取不出来
第4题:
下列论述HTTP协议中doGet和doPost方法的命题中,哪些是正确的()
第5题:
下面关于Servlet生命周期,说法不正确的是()。
第6题:
A、doPost()
B、doGet()
C、service()
D、destroy()
第7题:
Servlet的基本架构
public class ServletName extends HttpServlet {
public void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
}
public void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
}
}
1、用String的方法将数据类型转换为String。
1、String.valueOf(1.23)
第8题:
A.我们自己编写的Servlet继承了HttpServlet类,一般只需覆盖doPost或者doGet方法,不必覆盖service()方法。因为一个service()方法是空的
B.HttpServlet类扩展了GenericServlet类,实现了GenericServlet类的抽象方法service()
C.HttpServlet类有两个service()方法
D.我们自己编写的Servlet继承了HttpServlet类,一般只需覆盖doPost或者doGet方法,不必覆盖service()方法。因为一个service()方法会调用doPost或者doGet方法
第9题:
下面哪个方法不是HttpServlet类:()
第10题:
在J2EE中,对于HttpServlet类的描述,错误的是()。