单选题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)
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);
要将客户引导到另一个ASP页面,可以采用()。A、Response对象的Redirect方法B、Response对象的End方法C、Server对象的Execute方法D、Server对象的Transfer方法
下列类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);
response对象的setHeader(Stringname,Stringvalue)方法的作用是()。A、添加HTTP文件头B、设定指定名字的HTTP文件头的值C、判断指定名字的HTTP文件头是否存在D、向客户端发送错误信息
下列()不是request对象的方法。A、addHeader(Stringname,Stringvalue)B、getSession(Booleancreate)C、setAttrihute(Stringname,java.lang.Objecto)D、isSecure()
下列关于Application对象说法中错误的是()A、Application对象用于在多个程序中保存信息B、Application对象用来在所有用户间共享信息,但不可以在Web应用程序运行期间持久地保持数据。C、getAttribute(Stringname)方法返回由name指定的名字application对象的属性的值。D、getAttributeNames()方法返回所有application对象的属性的名字。E、setAttribute(Stringname,Objectobject)方法设置指定名字name的application对象的属性值Object
在J2EE中,request对象的()方法可以获取页面请求中一个表单组件对应多个值时的用户的请求数据。A、String[] getParameterValues(Stringname)B、String[] getParameter(Stringname)C、String getParameter(Stringname)D、String getParameterValuses(Stringname)
单选题下列类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));
填空题response.setHeader(“Refresh”, “5”)的含义是指页面刷新时间为()