Given: String value = getServletContext().getInitParameter("foo"); in an HttpServlet and a web applicationdeployment descriptor that contains: foo frodo Which two are true?()
Given an HttpServlet Request request and Http Servlet Response response, which sets a cookie “username” with the value “joe” in a servlet.?()
Given the HttpServlet code: getServletContext().setAttribute(“foo”, “value”); What is the result?()
Which retrieves the value associated with “foo” from within an HttpServlet?()
Given: 11.public class MyServlet extends HttpServlet { 12.public void service(HttpServletRequest request, 13.HttpServletResponse response) 14.throws ServletException, IOException { 15.// insert code here 16.} 17.} and this element in the web application’s deployment descriptor: 302 /html/error.html Which,inserted at line 15,causes the container to redirect control to the error.html resource?()
在J2EE中,对于HttpServlet类的描述,正确的是()。
J2EE中,当把来自客户机的HTTP请求委托给servlet时,会调用HttpServlet的()方法。
Given: 3.class MyServlet extends HttpServlet { 4.public void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException,IOException { 5.// servlet code here ... 26.} 27.} If the DD contains a single security constraint associated with MyServlet and its only tagsand tags are:GETPUT Admin Which four requests would be allowed by the container?()
如果我们的提交方式是POST,在httpservlet里没有dopost方法对应的话,将出现下面的哪种错误?()
在J2EE中,对于HttpServlet类的描述,正确的是()。