在JSP页面中,保存数据的范围由小到大依次是()。
第1题:
某JSP中有如下代码:
< %
pageContext.setAttribute( “a” , ” page ” );
request.setAttribute( “a” , ” request ” );
session.setAttribute( “a” , ” session ” );
application.setAttribute( “a” , ” application ” );
% >
有:${a}
则显示结果为:
A.page
B.request
C.session
D.application
第2题:
A.共享数据的范围page,request,session,application
B.共享数据的范围request,session,application
C.共享数据的范围session,application
D.共享数据的范围session
第3题:
在Sturts应用中,能在()范围内共享数据。
第4题:
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?()
第5题:
下面关于pageContext对象说法中正确的是()
第6题:
在jsp中作用域由小到大的组合是()
第7题:
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?()
第8题:
Which EL expression evaluates to the request URI?()
第9题:
pageContext.getAttribute(“foo”);
getPageContext().getAttribute(“foo”);
pageContext.getApplicationScope(“foo”);
pageContext.getAttribute(“foo”,pageContext.APPLICATION_SCOPE).getAttribute(“foo”);
getPageContext().getScope(pageContext.APPLICATION_SCOPE).getAttribute(“foo”);
第10题:
request对象可以得到请求中的参数
session对象可以保存用户信息
application对象可以被多个应用共享
作用域范围从小到达是request、session、application
第11题:
pageContext,request,application,session
pageContext,application,session,request
pageContext,request,session,application
pageContext,session,request,application
第12题:
pageContext对象为JSP页面包装页面的上下文。
pageContext对象创建和初始化都是由容器来完成的
getRequest()方法返回当前的request对象
getSession()方法返回当前页面的session对象。
removeAttribute()方法用来删除默认页面范围或特定范围之中的已命名对象。
第13题:
ASP提供的两个可用来存储变量的内建对象是______。
A.Request对象和Application对象
B.Session对象和Request对象
C.Session对象和Application对象
D.Session对象和Cookie对象
第14题:
如果只希望在多个页面间共享数据,可以使用()作用域。
第15题:
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?()
第16题:
Assume a tag handler extends TagSupport. Which is used within the tag handler to get an attribute “foo” that is in the application scope?()
第17题:
按作用域从大到小排列正确的是 ()
第18题:
以下有关JSP内置对象的说法错误的是()。
第19题:
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?()
第20题:
共享数据的范围page,request,session,application
共享数据的范围request,session,application
共享数据的范围session,application
共享数据的范围session
第21题:
application page request response
session page request application
public application session request
application session request page
第22题:
Add attributes to the session object.
Add attributes on the request object.
Add parameters to the request object.
Use the pageContext object to add request attributes.
Add parameters to the JSP’s URL when generating the request dispatcher.
第23题:
request page session application
page request session application
pageContext request session application
pageScope request sessionScope applicationScope