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

题目内容 (请给出正确答案)

在JSP页面中,保存数据的范围由小到大依次是()。

  • A、pageContext,request,application,session
  • B、pageContext,application,session,request
  • C、pageContext,request,session,application
  • D、pageContext,session,request,application

参考答案

更多 “在JSP页面中,保存数据的范围由小到大依次是()。A、pageContext,request,application,sessionB、pageContext,application,session,requestC、pageContext,request,session,applicationD、pageContext,session,request,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)

考题 某JSP中有如下代码:pageContext.setAttribute( “a” , ” page ” );request.setAttribute( “a” , ” request ” );session.setAttribute( “a” , ” session ” );application.setAttribute( “a” , ” application ” );% >有:${a}则显示结果为:A.pageB.requestC.sessionD.application

考题 ASP提供的两个可用来存储变量的内建对象是______。A.Request对象和Application对象B.Session对象和Request对象C.Session对象和Application对象D.Session对象和Cookie对象

考题 在Sturts应用中,能在()范围内共享数据。 A.共享数据的范围page,request,session,applicationB.共享数据的范围request,session,applicationC.共享数据的范围session,applicationD.共享数据的范围session

考题 如果只希望在多个页面间共享数据,可以使用()作用域。A、request,sessionB、application,sessionC、request,applicationD、pageContext,request

考题 在Sturts应用中,能在()范围内共享数据。A、共享数据的范围page,request,session,applicationB、共享数据的范围request,session,applicationC、共享数据的范围session,applicationD、共享数据的范围session

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

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

考题 按作用域从大到小排列正确的是 ()A、  application page request  responseB、  session page request  applicationC、  public  application session requestD、  application session  request  page

考题 在jsp中作用域由小到大的组合是()A、request page session applicationB、page request session applicationC、pageContext request session applicationD、pageScope request sessionScope applicationScope

考题 以下有关JSP内置对象的说法错误的是()。A、request对象可以得到请求中的参数B、session对象可以保存用户信息C、application对象可以被多个应用共享D、作用域范围从小到达是request、session、application

考题 Your web application uses a simple architecture in which servlets handle requests and then forward to aJSP using a request dispatcher. You need to pass information calculated in the servlet to the JSP for view generation.This information must NOT be accessible to any other servlet,JSP or session in the webapp. Which two techniques can you use to accomplish this goal?()A、Add attributes to the session object.B、Add attributes on the request object.C、Add parameters to the request object.D、Use the pageContext object to add request attributes.E、Add parameters to the JSP’s URL when generating the request dispatcher.

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

考题 Which EL expression evaluates to the request URI?()A、${requestURI}B、${request.URI}C、${request.getURI}D、${request.requestURI}E、${requestScope.requestURI}F、${pageContext.request.requestURI}

考题 单选题在Struts应用中,能在()范围内共享数据。A 共享数据的范围page,request,session,applicationB 共享数据的范围request,session,applicationC 共享数据的范围session,applicationD 共享数据的范围session

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

考题 单选题按作用域从大到小排列正确的是 ()A   application page request  responseB   session page request  applicationC   public  application session requestD   application session  request  page

考题 单选题下面关于JSP作用域对象的说法错误的是()A   request对象可以得到请求中的参数B   session对象可以保存用户信息C   application对象可以被多个应用共享D   作用域范围从小到达是request、session、application

考题 多选题Your web application uses a simple architecture in which servlets handle requests and then forward to aJSP using a request dispatcher. You need to pass information calculated in the servlet to the JSP for view generation.This information must NOT be accessible to any other servlet,JSP or session in the webapp. Which two techniques can you use to accomplish this goal?()AAdd attributes to the session object.BAdd attributes on the request object.CAdd parameters to the request object.DUse the pageContext object to add request attributes.EAdd parameters to the JSP’s URL when generating the request dispatcher.

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

考题 单选题在jsp中作用域由小到大的组合是()A request page session applicationB page request session applicationC pageContext request session applicationD pageScope request sessionScope applicationScope

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