网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
多选题
For a given Servlet Response response, which two retrieve an object for writing text data? ()
A

response.get Writer ()

B

response.get Output Stream ()

C

response.get Output Writer ()

D

response.get Writer ().get Output Stream()

E

response.get Writer (Writer.OUTPUT_TEXT)


参考答案

参考解析
解析: 暂无解析
更多 “多选题For a given Servlet Response response, which two retrieve an object for writing text data? ()Aresponse.get Writer ()Bresponse.get Output Stream ()Cresponse.get Output Writer ()Dresponse.get Writer ().get Output Stream()Eresponse.get Writer (Writer.OUTPUT_TEXT)” 相关考题
考题 Which two statistical data types are available on the statistics page of the WebUI? ()(Choose two.) A. cache statisticsB. client browser typeC. server response timeD. HTTP response codes

考题 Which two prevent a servlet from handling requests.?()A、 The servlet’s init method returns a non-zero status.B、 The servlet’s init method throws a Servlet ExceptionC、 The servlet’s init method sets the Servlet Response’s context length to 0D、 The servlet’s init method sets the Servlet Response’s content type to null.E、 The servlet’s init method does NOT return within a time period defined by the servlet container.

考题 For a given Servlet Response response, which retrieves an object for writing binary data? ()A、 response.get writer ()B、 response.get Output Stream ()C、 response.getOutput Writer()D、 response.get Writer ().get Output Stream ()E、 response.get Writer (Writer.OUTPUT_BINARY)

考题 For an HttpServlet Response response, which two create a custom header()A、 response.set Header (“X-MyHeader”. “34”):B、 response.addHeader (“X-MyHeader”. “34”):C、 response. Set Header (new Http Header (“X-MyHeader”. “34”)):D、 response.addHeader(new Http Header (“X-MyHeader”. “34”)):E、 response. addHeader (new Servlet Header (“X-MyHeader”. “34”)):F、 response. setHeader (new Servlet Header (“X-MyHeader”, “34”)):

考题 For an HttpServletResponse response,which two create a custom header?()A、response.setHeader("X-MyHeader", "34");B、response.addHeader("X-MyHeader", "34");C、response.setHeader(new HttpHeader("X-MyHeader", "34"));D、response.addHeader(new HttpHeader("X-MyHeader", "34"));E、response.addHeader(new ServletHeader("X-MyHeader", "34"));

考题 For a given ServletResponse response,which two retrieve an object for writing text data?()A、response.getWriter()B、response.getOutputStream()C、response.getOutputWriter()D、response.getWriter().getOutputStream()E、response.getWriter(Writer.OUTPUT_TEXT)

考题 Which two statistical data types are available on the statistics page of the WebUI? ()(Choose two.)A、cache statisticsB、client browser typeC、server response timeD、HTTP response codes

考题 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);

考题 Upon a user’s first visit to the website, which two operations are always performed when the getSession method is called with no arguments in a servlet?()A、 All URLs returned by the server are rewritten.B、 An HttpSession object is created if necessary.C、 The user name and password of the user are checked.D、 The session ID is stored in the HTTP response as a cookie.

考题 Which one of the following @Function to all "response"and "response to response"documents of parent documents?()A、@Responses      B、@AllChildren    C、@AllResponses  D、@AllDescendants 

考题 The WebSphere Application Server provides a Dynamic Cache Monitor.  Which of the following can be monitored using this tool?()A、Servlet Response TimesB、Cache StatisticsC、Database Connection Pool StatisticsD、Disk Statistics

考题 Given an HttpServletRequest request and HttpServletResponse response,which sets a cookie "username"with the value "joe" in a servlet?()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"))

考题 For a given ServletResponse response, which retrieves an object for writing binary data?()A、 response.getWriter()B、 response.getOutputStream()C、 response.getOutputWriter()D、 response.getWriter().getOutputSTream()E、 response.getWriter(Writer.OUTPUT_BINARY)

考题 For a given Servlet Response response, which two retrieve an object for writing text data? ()A、 response.get Writer ()B、 response.get Output Stream ()C、 response.get Output Writer ()D、 response.get Writer ().get Output Stream()E、 response.get Writer (Writer.OUTPUT_TEXT)

考题 多选题For an HttpServlet Response response, which two create a custom header()Aresponse.set Header (“X-MyHeader”. “34”):Bresponse.addHeader (“X-MyHeader”. “34”):Cresponse. Set Header (new Http Header (“X-MyHeader”. “34”)):Dresponse.addHeader(new Http Header (“X-MyHeader”. “34”)):Eresponse. addHeader (new Servlet Header (“X-MyHeader”. “34”)):Fresponse. setHeader (new Servlet Header (“X-MyHeader”, “34”)):

考题 单选题Given an HttpServlet Request request and Http Servlet Response response, which sets a cookie “username” with the value “joe” in a servlet.?()A  request.add Cookie (“username”. “joe”)B  request.set Cookie (“username, “joe”)C  response.add Cookie (username”, “joe”))D  request.add Header (new Cookie (“username”, “joe”))E  request.add Cookie (new Cookie (“username”, “joe”))F  response.add Cookie (new Cookie (“username”, “joe”))G  response.add Header (new Cookie (“username”, “joe”))

考题 多选题Which two security mechanisms protect the response stream?()AauthorizationBdata integrityCconfidentialityDauthentication

考题 单选题A web browser need NOT always perform a complete request for a particular page that it suspects mightNOT have changed. The HTTP specification provides a mechanism for the browser to retrieve only a partialresponse from the web server; this response includes information, such as the Last-Modified date but NOTthe body of the page. Which HTTP method will the browser use to retrieve such a partial response?()A GETB ASKC SENDD HEADE TRACE

考题 单选题Given an HttpServletRequest request and HttpServletResponse response,which sets a cookie "username"with the value "joe" in a servlet?()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))

考题 单选题Given a Filter class definition with this method: 21.public void doFilter(ServletRequest request, 22.ServletResponse response, 23.FilterChain chain) 24.throws ServletException, IOException { 25.// insert code here26. } Which should you insert at line 25 to properly invoke the next filter in the chain,or the target servlet if thereare no more filters?()A chain.forward(request, response);B chain.doFilter(request, response);C request.forward(request, response);D request.doFilter(request, response);

考题 多选题For a given Servlet Response response, which retrieves an object for writing binary data? ()Aresponse.get writer ()Bresponse.get Output Stream ()Cresponse.getOutput Writer()Dresponse.get Writer ().get Output Stream ()Eresponse.get Writer (Writer.OUTPUT_BINARY)

考题 单选题Your IT department is building a lightweight Front Controller servlet that invokes an application logic objectwith the interface: public interface ApplicationController {public String invoke(HttpServletRequest request)} The return value of this method indicates a symbolic name of the next view. From this name, the FrontController servlet looks up the JSP URL in a configuration table. This URL might be an absolute path or apath relative to the current request. Next, the Front Controller servlet must send the request to this JSP togenerate the view. Assume that the servlet variable request is assigned the current HttpServletRequestobject and the variable context is assigned the webapp’s ServletContext. Which code snippet of the FrontController servlet accomplishes this goal?()A Dispatcher view=context.getDispatcher(viewURL);view.forward Request(request, response);B Dispatcher view=request.getDispatcher(viewURL);view.forward Request(request, response);C RequestDispatcher view. =context.getRequestDispatcher(viewURL);view.forward(request,response);D RequestDispatcher view=request.getRequestDispatcher(viewURL);view.forward(request, response);

考题 单选题For a given ServletResponse response, which retrieves an object for writing binary data?()A  response.getWriter()B  response.getOutputStream()C  response.getOutputWriter()D  response.getWriter().getOutputSTream()E  response.getWriter(Writer.OUTPUT_BINARY)

考题 多选题For a given Servletresponse response, which two retrieve an object for writing text data? ()Aresponse.getWriter( )Bresponse.getOutputStream( )Cresponse.getOutputWriter( )Dresponse.getWriter( ) .getOutputStream( )Eresponse.getWriter(Writer.OUTPUT_TEXT( )

考题 多选题Which two prevent a servlet from handling requests.?()AThe servlet’s init method returns a non-zero status.BThe servlet’s init method throws a Servlet ExceptionCThe servlet’s init method sets the Servlet Response’s context length to 0DThe servlet’s init method sets the Servlet Response’s content type to null.EThe servlet’s init method does NOT return within a time period defined by the servlet container.

考题 多选题Upon a user’s first visit to the website, which two operations are always performed when the getSession method is called with no arguments in a servlet?()AAll URLs returned by the server are rewritten.BAn HttpSession object is created if necessary.CThe user name and password of the user are checked.DThe session ID is stored in the HTTP response as a cookie.

考题 单选题Given that login.getName() returns a java.lang.String value and given the JSP code:  Welcome Which is equivalent?()A % Welcome % out.print(login.getName()); % B  Welcome % writer.print(login.getName()); % C  Welcome % response.out.print(login.getName()); %D  Welcome % response.writer.print(login.getName()); % E  Welcome % response.getOutputStream().write(login.getName()); %