多项选择题
You are creating a servlet that generates stock market graphs. You want to provide the web browser withprecise information about the amount of data being sent in the response stream.
Which twoHttpServletResponse methods will you use to provide this information?()
A.response.setLength(numberOfBytes);
B.response.setContentLength(numberOfBytes);
C.response.setHeader("Length", numberOfBytes);
D.response.setIntHeader("Length", numberOfBytes);
E.response.setHeader("Content-Length", numberOfBytes);
F.response.setIntHeader("Content-Length", numberOfBytes);
相关考题
-
单项选择题
Your web page includes a Java SE v1.5 applet with the following declaration: 11.<object classid=’clsid:CAFEEFAC-0015-0000-0000-ABCDEFFEDCBA’ 12.width=’200’ height=’200’> 13.<param name=’code’ value=’Applet.class’ /> 14.</object> Which HTTP method is used to retrieve the applet code?()
A.GET
B.PUT
C.POST
D.RETRIEVE -
单项选择题
GivenanHttpServletRequestrequestandHttpServletResponseresponse,whichsetsacookie"username"withthevalue"joe"inaservlet?()
A.request.addCookie("username", "joe")
B.request.setCookie("username", "joe")
C.response.addCookie("username", "joe")
D.request.addHeader(new Cookie("username", "joe"))
E.request.addCookie(new Cookie("username", "joe"))
F.response.addCookie(new Cookie("username", "joe")) -
单项选择题
You need to create a JavaBean object that is used only within the current JSP page. It must NOT beaccessible to any other page including those that this page might import. Which JSP standard action canaccomplish this goal?()
A.<jsp:useBean id=’pageBean’ type=’com.example.MyBean’ />
B.<jsp:useBean id=’pageBean’ class=’com.example.MyBean’ />
C.<jsp:makeBean id=’pageBean’ type=’com.example.MyBean’ />
D.<jsp:makeBean id=’pageBean’ class=’com.example.MyBean’ />
