Given the HttpServlet code: getServletContext().setAttribute(“foo”, “value”); What is the result?()
第1题:
Given: String value = getServletContext().getInitParameter("foo"); in an HttpServlet and a web applicationdeployment descriptor that contains:
第2题:
自定义的servlet应重载Httpservlet类的()方法以响应客户发出的post 请求方法。
第3题:
HttpServlet类中定义了Servlet对象必须实现的init(),Service(),destroy()等方法。()
第4题:
HttpServlet是定义在()套件之中。
第5题:
下列对HttpServlet类描述错误的是()
第6题:
下列哪项不是HttpServlet的方法()
第7题:
我们自己编写的Servlet继承了HttpServlet类,一般只需覆盖doPost或者doGet方法,不必覆盖service()方法。因为一个service()方法是空的
HttpServlet类扩展了GenericServlet类,实现了GenericServlet类的抽象方法service()
HttpServlet类有两个service()方法
我们自己编写的Servlet继承了HttpServlet类,一般只需覆盖doPost或者doGet方法,不必覆盖service()方法。因为一个service()方法会调用doPost或者doGet方法
第8题:
response.setError(302);
response.sendError(302);
response.setStatus(302);
response.sendRedirect(302);
response.sendErrorRedirect(302);
第9题:
service
doget
dopost
init
第10题:
doHead
doGet
doPost
doPut
第11题:
The foo initialization parameter CANNOT be set programmatically.
Compilation fails because getInitParameter returns type Object.
The foo initialization parameter is NOT a servlet initialization parameter.
Compilation fails because ServletContext does NOT have a getInitParameter method.
The foo parameter must be defined within the
第12题:
An IllegalStateException is thrown at runtime.
An InvalidSessionException is thrown at runtime.
The string value=null appears in the response stream.
The string value=myAttributeValue appears in the response stream.
第13题:
Why does IS-IS use the SPF algorithm?()
第14题:
HttpServlet类中定义了Servlet对象必须实现()。
第15题:
J2EE中以下关于HttpServlet的说法错误的是()
第16题:
在J2EE中,对于HttpServlet类的描述,错误的是()。
第17题:
JAVA EE中,当把来自客户机的HTTP请求委托给servlet时,会调用HttpServlet的()方法。
第18题:
编写Servlet的doPost方法时,需要抛出的异常是()
第19题:
request.add Cookie (“username”. “joe”)
request.set Cookie (“username, “joe”)
response.add Cookie (username”, “joe”))
request.add Header (new Cookie (“username”, “joe”))
request.add Cookie (new Cookie (“username”, “joe”))
response.add Cookie (new Cookie (“username”, “joe”))
response.add Header (new Cookie (“username”, “joe”))
第20题:
我们自己编写的Servlet继承了HttpServlet类,一定需覆盖doPost或者doGet
Httpservlet类扩展了GenericServlet类,实现了GenericServlet类的抽象方法
Httpservlet类中处理客户请求和响应时所使用的两个接口是:HttpServletRequest和HttpServletResponse
我们自己编写的servlet继承了Httpservlet类,一般只需要覆盖doPost或doGet方法,不必覆盖servive()方法,因为一个service()方法会调用doPost或者doGet方法
第21题:
对
错
第22题:
HttpServlet是一个抽象类
HttpServlet类扩展了GenericServlet类
HttpServlet类的子类必须至少重写service方法
HttpServlet位于javax.servlet.http包中
第23题:
The attribute foo is placed in the application
A ServletContextListener registered for that servlet is notified
A ServletAttributeListener registered for that servlet is notified
An HttpSessionAttributeListener registered for that servlet is notified