单选题pageContext对象的findAttribute()方法的作用是()。A用来设置默认页面的范围或指定范围之中的已命名对象B用来删除默认页面范围或指定范围之中已命名的对象C按照页面请求、会话以及应用程序范围的顺序实现对某个已命名属性的搜索D以字符串的形式返回一个对异常的描述

单选题
pageContext对象的findAttribute()方法的作用是()。
A

用来设置默认页面的范围或指定范围之中的已命名对象

B

用来删除默认页面范围或指定范围之中已命名的对象

C

按照页面请求、会话以及应用程序范围的顺序实现对某个已命名属性的搜索

D

以字符串的形式返回一个对异常的描述


参考解析

解析: 暂无解析

相关考题:

下面关于pageContext对象说法中正确的是() A、pageContext对象为JSP页面包装页面的上下文。B、pageContext对象创建和初始化都是由容器来完成的C、getRequest()方法返回当前的request对象D、getSession()方法返回当前页面的session对象。E、removeAttribute()方法用来删除默认页面范围或特定范围之中的已命名对象。

给定一个自定义标签程序的代码片断如下:public int doStartTage() throws JspTagException{pageContext.getAttribute(“A”); //第二行return EVAL_BODY_INCLUDE;}假定第二行返回的对象引用不是null,那么这个对象存储在( )范围中A、pageB、sessionC、requestD、application

AssumeataghandlerextendsTagSupport.Whichisusedwithinthetaghandlertogetanattribute“foo”thatisintheapplicationscope?() A.pageContext.getAttribute(“foo”);B.getPageContext().getAttribute(“foo”);C.pageContext.getApplicationScope(“foo”);D.pageContext.getAttribute(“foo”,pageContext.APPLICATION_SCOPE).getAttribute(“foo”);E.getPageContext().getScope(pageContext.APPLICATION_SCOPE).getAttribute(“foo”);

Given:3.publicclassMyTagHandlerextendsTagSupport{4.publicintdoStartTag(){5.//insertcodehere6.//returnanint7.}8.//morecodehere...18.}Thereisasingleattributefoointhesessionscope.Whichthreecodefragments,insertedindependentlyatline5,returnthevalueoftheattribute?()A.Objecto=pageContext.getAttribute(foo);B.Objecto=pageContext.findAttribute(foo);C.Objecto=pageContext.getAttribute(foo,PageContext.SESSION_SCOPE);D.HttpSessions=pageContext.getSession();Objecto=s.getAttribute(foo);

Adeveloperwantstomakeanameattributeavailabletoallservletsassociatedwithaparticularuser,acrossmultiplerequestsfromthatuser,fromthesamebrowserinstance.Whichtwoprovidethiscapability fromwithinataghandler?()A.pageContext.setAttribute(name,theValue)B.pageContext.setAttribute(name,getSession())C.pageContext.getRequest().setAttribute(name,theValue)D.pageContext.getSession().setAttribute(name,theValue)E.pageContext.setAttribute(name,theValue,PageContext.PAGE_SCOPE)F.pageContext.setAttribute(name,theValue,PageContext.SESSION_SCOPE)

GiventheJSPcode:%request.setAttribute(foo,bar);%andtheClassictaghandlercode:5.publicintdoStartTag()throwsJspException{6.//insertcodehere7.//returnint8.}Assumetherearenootherfooattributesinthewebapplication.WhichinvocationonthepageContextobject,insertedatline6,assignsbartothevariablex?()A.Stringx=(String)pageContext.getAttribute(foo)B.Stringx=(String)pageContext.getRequestScope(foo)C.ItisNOTpossibletoaccessthepageContextobjectfromwithindoStartTagD.Stringx=(String)pageContext.getRequest().getAttribute(foo)E.Stringx=(String)pageContext.getAttribute(foo,PageContext.ANY_SCOPE)

构造方法的作用是( )。A.复制对象B.初始化对象C.对象赋值D.回收对象

封装的的作用是()。A复用B对象C实例D方法

构造方法被调用是当()A、类定义时B、使用对象的属性C、使用对象的方法时D、对象被创建时

对象作方法形参时,方法实参也用对象,实现()调用。

Given: 3.public class MyTagHandler extends TagSupport { 4.public int doStartTag() { 5.// insert code here 6.// return an int 7.} 8.// more code here ... 18.} There is a single attribute foo in the session scope. Which three code fragments,inserted independently atline 5,return the value of the attribute?()A、Object o = pageContext.getAttribute("foo");B、Object o = pageContext.findAttribute("foo");C、Object o = pageContext.getAttribute("foo",PageContext.SESSION_SCOPE);D、HttpSession s = pageContext.getSession();Object o = s.getAttribute("foo");

A developer wants to make a name attribute available to all servlets associated with a particular user,across multiple requests from that user, from the same browser instance. Which two provide this capability from within a tag handler?()A、pageContext.setAttribute("name", theValue)B、pageContext.setAttribute("name", getSession())C、pageContext.getRequest().setAttribute("name", theValue)D、pageContext.getSession().setAttribute("name", theValue)E、pageContext.setAttribute("name", theValue,PageContext.PAGE_SCOPE)F、pageContext.setAttribute("name", theValue,PageContext.SESSION_SCOPE)

Assume a tag handler extends TagSupport. Which is used within the tag handler to get an attribute “foo” that is in the application scope?()A、 pageContext.getAttribute(“foo”);B、 getPageContext().getAttribute(“foo”);C、 pageContext.getApplicationScope(“foo”);D、 pageContext.getAttribute(“foo”,pageContext.APPLICATION_SCOPE).getAttribute(“foo”);E、 getPageContext().getScope(pageContext.APPLICATION_SCOPE).getAttribute(“foo”);

对象可作方法参数,对象数组不能作方法参数。

connection对象常用的方法有哪些?它们的作用是什么?

Connection对象的作用是什么?Connection对象的什么方法用来打开和关闭数据库连接?

pageContext对象的findAttribute()方法的作用是()。A、用来设置默认页面的范围或指定范围之中的已命名对象B、用来删除默认页面范围或指定范围之中已命名的对象C、按照页面请求、会话以及应用程序范围的顺序实现对某个已命名属性的搜索D、以字符串的形式返回一个对异常的描述

以下选项不是EL表达式隐含对象的是()。 A、 requestB、 requestScopeC、 sessionScopeD、 pageContext

在JSP页面中,保存数据的范围由小到大依次是()。A、pageContext,request,application,sessionB、pageContext,application,session,requestC、pageContext,request,session,applicationD、pageContext,session,request,application

Given the JSP code: % request.setAttribute("foo", "bar"); %and the Classic tag handler code: 5. public int doStartTag() throws JspException { 6. // insert code here 7. // return int 8. } Assume there are no other "foo" attributes in the web application. Which invocation on the pageContextobject,inserted at line 6,assigns "bar" to the variable x?()A、String x = (String) pageContext.getAttribute("foo")B、String x = (String) pageContext.getRequestScope("foo")C、It is NOT possible to access the pageContext object from within doStartTagD、String x = (String) pageContext.getRequest().getAttribute("foo")E、String x = (String) pageContext.getAttribute("foo", PageContext.ANY_SCOPE)

单选题以下选项不是EL表达式隐含对象的是()。A requestB requestScopeC sessionScopeD pageContext

多选题下面关于pageContext对象说法中正确的是()ApageContext对象为JSP页面包装页面的上下文。BpageContext对象创建和初始化都是由容器来完成的CgetRequest()方法返回当前的request对象DgetSession()方法返回当前页面的session对象。EremoveAttribute()方法用来删除默认页面范围或特定范围之中的已命名对象。

单选题构造方法被调用是当()A类定义时B使用对象的属性C使用对象的方法时D对象被创建时

判断题对象可作方法参数,对象数组不能作方法参数。A对B错

单选题Assume a tag handler extends TagSupport. Which is used within the tag handler to get an attribute “foo” that is in the application scope?()A pageContext.getAttribute(“foo”);B getPageContext().getAttribute(“foo”);C pageContext.getApplicationScope(“foo”);D pageContext.getAttribute(“foo”,pageContext.APPLICATION_SCOPE).getAttribute(“foo”);E getPageContext().getScope(pageContext.APPLICATION_SCOPE).getAttribute(“foo”);

单选题You work as an application developer at Certkiller .com. You are currently in the process of creating a class that stores data about Certkiller .com’s customers. Certkiller .com customers are assigned unique identifiers and various characteristics that may include aliases, shipping instructions, and sales comments. These characteristics can change in both size and data type. You start by defining the Customer class as shown below: public class Customer { private int custID; private ArrayList attributes; public int CustomerID { get {return custID;} } public Customer (int CustomerID) { this.custID = CustomerID; this.attributes = new ArrayList (); } public void AddAttribute (object att) {  attributes.Add (att); } } You have to create the FindAttribute method for locating attributes in Customer objects no matter what the data type is.You need to ensure that the FindAttributemethod returns the attribute if found,and you also need to ensure type-safety when returning the attribute.What should you do?()A Use the following code to declare the FindAttribute method: public T FindAttribute (T att) {//Find attribute and return the value }B Use the following code to declare the FindAttribute method: public object FindAttribute (object att) {//Find attribute and return the value }C Use the following code to declare the FindAttribute method: public T FindAttribute  (T att) {//Find attribute and return the value }D Use the following code to declare the FindAttribute method: public string FindAttribute (string att) {//Find attribute and return the value }

单选题pageContext对象的findAttribute()方法的作用是()。A用来设置默认页面的范围或指定范围之中的已命名对象B用来删除默认页面范围或指定范围之中已命名的对象C按照页面请求、会话以及应用程序范围的顺序实现对某个已命名属性的搜索D以字符串的形式返回一个对异常的描述

单选题Given the JSP code: and the Classic tag handler code: 5. public int doStartTag() throws JspException { 6. // insert code here 7. // return int 8. } Assume there are no other "foo" attributes in the web application. Which invocation on the pageContextobject,inserted at line 6,assigns "bar" to the variable x?()AString x = (String) pageContext.getAttribute(foo)BString x = (String) pageContext.getRequestScope(foo)CIt is NOT possible to access the pageContext object from within doStartTagDString x = (String) pageContext.getRequest().getAttribute(foo)EString x = (String) pageContext.getAttribute(foo, PageContext.ANY_SCOPE)