网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
下列()不是request对象的方法。
- A、addHeader(Stringname,Stringvalue)
- B、getSession(Booleancreate)
- C、setAttrihute(Stringname,java.lang.Objecto)
- D、isSecure()
参考答案
更多 “下列()不是request对象的方法。A、addHeader(Stringname,Stringvalue)B、getSession(Booleancreate)C、setAttrihute(Stringname,java.lang.Objecto)D、isSecure()” 相关考题
考题
下面哪项不是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)
考题
GivenanHttpServletRequestrequest:22.Stringid=request.getParameter(jsessionid);23.//insertcodehere24.Stringname=(String)session.getAttribute(name);Whichthreecanbeplacedatline23toretrieveanexistingHttpSessionobject?()A.HttpSessionsession=request.getSession();B.HttpSessionsession=request.getSession(id);C.HttpSessionsession=request.getSession(true);D.HttpSessionsession=request.getSession(false);E.HttpSessionsession=request.getSession(jsessionid);
考题
WhichretrievesallcookiessentinagivenHttpSErvletRequestrequest?()
A.request.getCookies()B.request.getAttributes()C.request.getSession().getCookies()D.request.getSession().GetAttributes()
考题
Fordebuggingpurposes,youneedtorecordhowmanytimesagivenJSPisinvokedbeforetheuser’ssessionhasbeencreated.TheJSP’sdestroymethodstoresthisinformationtoadatabase.WhichJSPcodesnippetkeepstrackofthiscountforthelifetimeoftheJSPpage?()A.%!intcount=0;%%if(request.getSession(false)==null)count++;%B.%@intcount=0;%.%if(request.getSession(false)==null)count++;%C.%intcount=0;.if(request.getSession(false)==null)count++;%D.%@intcount=0;.if(request.getSession(false)==null)count++;%E.%!intcount=0;.if(request.getSession(false)==null)count++;%
考题
classBigDogextendsDog{2.//insertcodehere3.}分别插入到第2行,哪二项可以编译?()
A.BigDog(){super();this();}B.BigDog(){Stringname=Fido;super();}C.BigDog(){super();Stringname=Fido;}D.privateBigDog(){super();}
考题
类Teacher:classTeacher{Stringname;floatsalary;Teacher(Stringname){this.name=name;}Teacher(Stringname,floatsalary){this.name=name;this.salary=salary;}}执行语句Teachert=newTeacher(Tom”,2000.0f);后,字段salary的值是哪一项?()A.2000.0fB.0.0fC.null;D.2000
考题
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();
考题
在创建线程时可以显示地指定线程组,此时可供选择的线程构造方法有( )种。pubicTbread(ThreadGroupgroup,Rurmabletarget):publicThread(ThreadGroupgroup,Stringname);publicThread(ThreadGroupgroup,Runnabletarget,Stringname)。A.1B.2C.3D.4
考题
FilterConfig的哪个方法可以返回init参数的名称?()A、getServletContext()B、getInitParameter(Stringname)C、getFilterName()D、getInitParameterNames()
考题
使用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){)
考题
Given an HttpServletRequest request: 22.String id = request.getParameter("jsessionid"); 23.// insert code here 24.String name = (String) session.getAttribute("name"); Which three can be placed at line 23 to retrieve anexisting HttpSession object?()A、HttpSession session = request.getSession();B、HttpSession session = request.getSession(id);C、HttpSession session = request.getSession(true);D、HttpSession session = request.getSession(false);E、HttpSession session = request.getSession("jsessionid");
考题
在文件存储中,若要获得SD卡的存储路径,需要调用()A、Environment.getExternalStorageDirectory()B、openFileOutput(Stringname,intmode)C、File(Filedir,Stringname)D、Environment.getDataDirectory()
考题
response对象的setHeader(Stringname,Stringvalue)方法的作用是()。A、添加HTTP文件头B、设定指定名字的HTTP文件头的值C、判断指定名字的HTTP文件头是否存在D、向客户端发送错误信息
考题
下列关于Application对象说法中错误的是()A、Application对象用于在多个程序中保存信息B、Application对象用来在所有用户间共享信息,但不可以在Web应用程序运行期间持久地保持数据。C、getAttribute(Stringname)方法返回由name指定的名字application对象的属性的值。D、getAttributeNames()方法返回所有application对象的属性的名字。E、setAttribute(Stringname,Objectobject)方法设置指定名字name的application对象的属性值Object
考题
下列哪种方式可以在session中保存一个名为"name",值为"newer"的属性()A、request.getSession().setAttribute(“name”,"newer")B、request.getSession().getAttribute(“ID”,id);C、request.getSession().setParameter(“ID”,id);D、request.getSession().getParameter(“ID”,id)
考题
在J2EE中,request对象的()方法可以获取页面请求中一个表单组件对应多个值时的用户的请求数据。A、String[] getParameterValues(Stringname)B、String[] getParameter(Stringname)C、String getParameter(Stringname)D、String getParameterValuses(Stringname)
考题
Which retrieves all cookies sent in a given HttpSErvletRequest request?()A、 request.getCookies()B、 request.getAttributes()C、 request.getSession ().getCookies()D、 request.getSession (). GetAttributes()
考题
单选题在J2EE中,request对象的()方法可以获取页面请求中一个表单组件对应多个值时的用户的请求数据。A
String[] getParameterValues(Stringname)B
String[] getParameter(Stringname)C
String getParameter(Stringname)D
String getParameterValuses(Stringname)
考题
单选题下列类Account的构造方法中,声明正确的是?()A
Account(Stringname){)B
Account(Stringname)C
Account(name)()D
NewAccount(Stringname){)
考题
单选题FilterConfig的哪个方法可以返回init参数的名称?()A
getServletContext()B
getInitParameter(Stringname)C
getFilterName()D
getInitParameterNames()
考题
单选题在文件存储中,若要获得SD卡的存储路径,需要调用()A
Environment.getExternalStorageDirectory()B
openFileOutput(Stringname,intmode)C
File(Filedir,Stringname)D
Environment.getDataDirectory()
考题
单选题下列关于Application对象说法中错误的是()A
Application对象用于在多个程序中保存信息B
Application对象用来在所有用户间共享信息,但不可以在Web应用程序运行期间持久地保持数据。C
getAttribute(Stringname)方法返回由name指定的名字application对象的属性的值。D
getAttributeNames()方法返回所有application对象的属性的名字。E
setAttribute(Stringname,Objectobject)方法设置指定名字name的application对象的属性值Object
考题
单选题Which retrieves all cookies sent in a given HttpSErvletRequest request?()A
request.getCookies()B
request.getAttributes()C
request.getSession ().getCookies()D
request.getSession (). GetAttributes()
考题
单选题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()
热门标签
最新试卷