多项选择题()对象的属性设定可以跨越请求范围。

A.ServletRequest
B.HttpSession
C.ServletConfig
D.ServletContext


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题HttpSession失效的时机是()。

A.执行invaliate()方法
B.关闭浏览器
C.存活时间超过setMaxInactiveInterval()方法设定的时间

2.多项选择题关于Servlet/JSP的Session ID,()是正确。

A.预设使用Cookie来储存Session ID
B.Cookie的名称是JSESSION ID
C.在禁用Cookie时,可以使用URL重写来发送Session ID
D.必须自行呼叫HttpSession的getId()方可产生

3.单项选择题()可以实作使用者的自动登入机制。

A.HttpSession
B.Cookie
C.HttpServletRequest
D.URL重写

4.单项选择题web.xml中的设定单位是()。

A.时
B.分
C.秒
D.毫秒

5.多项选择题在浏览器禁用Cookie的情况下,()机制仍可以用于会话管理。

A.HttpSession
B.URL重写
C.隐藏字段
D.Cookie API

6.单项选择题()设定Cookie的有效期限。

A.使用setMaxAge()
B.使用setMaxInactive()
C.使用setMaxInactiveInterval()

7.多项选择题ServletContext定义与属性相关的方法是哪三个()。

A.getAttribute()
B.setAttribute()
C.deleteAttribute()
D.removeAttribute()

8.单项选择题如果要取得ServletContext初始参数,则可以执行()方法。

A.getContextParameter()
B.getParameter()
C.getInitParameter()
D.getAttribute()

9.单项选择题如果是整个应用程序会共享的数据,则适合存放在()对象之中成为属性。

A.ServletConfig
B.ServletContext
C.ServletRequest
D.Session

10.多项选择题哪几个方法是定义在HttpServletRequest中,而非由ServletRequet中继承而来()。

A.getMethod()
B.getHeader()
C.getParameter()
D.getCookies()