response对象的setHeader(Stringname,Stringvalue)方法的作用是()。A、添加HTTP文件头B、设定指定名字的HTTP文件头的值C、判断指定名字的HTTP文件头是否存在D、向客户端发送错误信息
response对象的setHeader(Stringname,Stringvalue)方法的作用是()。
- A、添加HTTP文件头
- B、设定指定名字的HTTP文件头的值
- C、判断指定名字的HTTP文件头是否存在
- D、向客户端发送错误信息
相关考题:
下面哪项不是response对象的方法() A、setContentType(StringcontentTypestr)B、setHeader(Stringheadername,Stringheadervalue)C、getParameter(Stringstr)D、sendError(interrorcode)
下面哪项不是application对象的方法()A、getAttribute(Stringname)B、getCookies()C、getInitParameter()D、setAttribute(Stringname,Objectvalue)
WhichHttpSessionmethodstoresanobjectinasession?() A.put(Stringname.Objectvalue)B.set(Stringname.Objectvalue)C.setAttribute(Stringname.Objectvalue)D.putAttribute(Stringname.Objectvalue)E.addAttribute(Stringname.Objectvalue)
ForanHttpServletResponseresponse,whichtwocreateacustomheader?() A.response.setHeader(X-MyHeader,34);B.response.addHeader(X-MyHeader,34);C.response.setHeader(newHttpHeader(X-MyHeader,34));D.response.addHeader(newHttpHeader(X-MyHeader,34));E.response.addHeader(newServletHeader(X-MyHeader,34));
ForanHttpServletResponseresponse,whichtwocreateacustomheader() A.response.setHeader(“X-MyHeader”.“34”):B.response.addHeader(“X-MyHeader”.“34”):C.response.SetHeader(newHttpHeader(“X-MyHeader”.“34”)):D.response.addHeader(newHttpHeader(“X-MyHeader”.“34”)):E.response.addHeader(newServletHeader(“X-MyHeader”.“34”)):F.response.setHeader(newServletHeader(“X-MyHeader”,“34”)):
Youarecreatingaservletthatgeneratesstockmarketgraphs.Youwanttoprovidethewebbrowserwithpreciseinformationabouttheamountofdatabeingsentintheresponsestream.WhichtwoHttpServletResponsemethodswillyouusetoprovidethisinformation?()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);
Whichgetsthenameoftheparentdirectoryfile“file.txt”?() A.Stringname=File.getParentName(“file.txt”);B.Stringname=(newFile(“file.txt”)).getParent();C.Stringname=(newFile(“file.txt”)).getParentName();D.Stringname=(newFile(“file.txt”)).getParentFile();E.Directorydir=(newFile(“file.txt”)).getParentDir();Stringname=dir.getName();
要将客户引导到另一个ASP页面,可以采用()。A、Response对象的Redirect方法B、Response对象的End方法C、Server对象的Execute方法D、Server对象的Transfer方法
使用GET方式提交数据,接收数据时,处理中文最直接有效方式为()。A、request.setCharacterEncoding("utf-8")B、response.setContentType("text/html;charset=utf-8")C、Stringname=newString(request.getParameter("name").getBytes("ISO-8859-1"),"gbk")D、response.setCharacterEncoding("gbk")
下列类Account的构造方法中,声明正确的是?()A、Account(Stringname){)B、Account(Stringname)C、Account(name)()D、NewAccount(Stringname){)
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"));
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);
下列()不是request对象的方法。A、addHeader(Stringname,Stringvalue)B、getSession(Booleancreate)C、setAttrihute(Stringname,java.lang.Objecto)D、isSecure()
在J2EE中,request对象的()方法可以获取页面请求中一个表单组件对应多个值时的用户的请求数据。A、String[] getParameterValues(Stringname)B、String[] getParameter(Stringname)C、String getParameter(Stringname)D、String getParameterValuses(Stringname)
多选题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”)):
单选题下列类Account的构造方法中,声明正确的是?()AAccount(Stringname){)BAccount(Stringname)CAccount(name)()DNewAccount(Stringname){)
单选题下列()不是request对象的方法。AaddHeader(Stringname,Stringvalue)BgetSession(Booleancreate)CsetAttrihute(Stringname,java.lang.Objecto)DisSecure()
多选题For an HttpServletResponse response,which two create a custom header?()Aresponse.setHeader(X-MyHeader, 34);Bresponse.addHeader(X-MyHeader, 34);Cresponse.setHeader(new HttpHeader(X-MyHeader, 34));Dresponse.addHeader(new HttpHeader(X-MyHeader, 34));Eresponse.addHeader(new ServletHeader(X-MyHeader, 34));
多选题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?()Aresponse.setLength(numberOfBytes);Bresponse.setContentLength(numberOfBytes);Cresponse.setHeader(Length, numberOfBytes);Dresponse.setIntHeader(Length, numberOfBytes);Eresponse.setHeader(Content-Length, numberOfBytes);Fresponse.setIntHeader(Content-Length, numberOfBytes);
单选题response对象的setHeader(Stringname,Stringvalue)方法的作用是()。A添加HTTP文件头B设定指定名字的HTTP文件头的值C判断指定名字的HTTP文件头是否存在D向客户端发送错误信息