Java考试

关于Servlet/JSP的Session ID,()是正确。A、预设使用Cookie来储存Session IDB、Cookie的名称是JSESSION IDC、在禁用Cookie时,可以使用URL重写来发送Session IDD、必须自行呼叫HttpSession的getId()方可产生

题目

关于Servlet/JSP的Session ID,()是正确。

  • A、预设使用Cookie来储存Session ID
  • B、Cookie的名称是JSESSION ID
  • C、在禁用Cookie时,可以使用URL重写来发送Session ID
  • D、必须自行呼叫HttpSession的getId()方可产生
如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

关于Cookie设置,以下说法正确的是()。

A.Web服务器查看上次留下的Cookie资料,会根据Cookie里的内容来判断使用者,反馈特定的网页内容给用户

B.使用Cookie设置的优点是:简单、方便;缺点是:容易信息泄漏

C.Cookie最广泛的应用是记录用户的登录信息

D.某些网站为了辨别用户身份、进行session跟踪而储存在用户本地终端上的数据


正确答案:ABCD

第2题:

19描述Cookie和Session的作用,区别和各自的应用范围,Session工作原理。


正确答案:
 

第3题:

在J2EE中,以下对于会话跟踪的描述,正确的是()。

A.客户浏览器禁用了Cookie后,在Servlet中的getSession方法就无法获得HttpSession对象了

B.客户浏览器禁用了Cookie后,可以使用HttpServletResponse接口中的encodeURL()方法对URL编码。但客户如果没有禁用Cookie,使用HttpServletResponse接口中的encodeURL()方法对URL编码会出错

C.使用HttpServletResponse接口中的encodeURL()方法对URL编码后,这个方法把以分号开头的字符串形式的路径加入到输入的URL中,如;jsessionid=123456789

D.只要使用HttpServletResponse接口中的encodeURL()方法对URL进行编码,Web应用程序的用户在浏览器中禁止cookie和不禁止cookie都是一样的


参考答案:C, D

第4题:

下面对于cookie的说法错误的是:()。

  • A、cookie是一小段存储在浏览器端文本信息,web应用程序可以读取cookie包含的信息
  • B、cookie可以存储一些敏感的用户信息,从而造成一定的安全风险
  • C、通过cookie提交精妙构造的移动代码,绕过身份验证的攻击叫做cookie欺骗
  • D、防范cookie欺骗的一个有效方法是不使用cookie验证方法,而使用session验证方法

正确答案:C

第5题:

Which two options best describe the purpose of session ID and cookie field in a L2TPv3 packet?()

  • A、The session ID is a 32-bit locally significant field used to identify the call on the destination or egresstunnel endport. The session ID will be negotiated by the control connection or statically defined if usingthe L2TP v3 data plane only
  • B、The cookie is a variable length(with a maximum of eight bytes),word-aligned optional field. The controlconnection can negotiate this as an additional level of guarantee beyond the regular session ID lookupto make sure that a data message has been directed to the correct session or that any recently reusedsession ID will not be misdirected
  • C、The cookie is a 32-bit locally significant field used to identify the call on the destination or egress tunnelendpoint. The cookie will be negotiated by the control connection or statically defined if using theL2TPv3 data plane only
  • D、The session ID is a variable length(with a maximum of eight bytes),word-aligned optional field the control connection can negotiate this as an additional level of guarantee beyond the regular cookielookup to make sure that a data message has been directed to the correct session or that any recentlyreused cookie will not be misdirected.

正确答案:A,B

第6题:

cookie与session的区别;session的运行机制(工作原理)。


正确答案:
 

第7题:

简述cookie和session的区别。


正确答案: 1.cookie数据存放在客户的浏览器上,session数据放在服务器上。
2.cookie不是很安全,别人可以分析存放在本地的COOKIE并进行COOKIE欺骗 考虑到安全应当使用session。
3.session会在一定时间内保存在服务器上。当访问增多,会比较占用你服务器的性能 考虑到减轻服务器性能方面,应当使用COOKIE。
4.单个cookie保存的数据不能超过4K,很多浏览器都限制一个站点最多保存20个cookie。
5.所以个人建议:将登陆信息等重要信息存放为SESSION其他信息如果需要保留,可以放在COOKIE中

第8题:

session和cookie相比有什么不同()

A、二者皆可能用到cookie,但Session可以不依赖它

B、Session数据集中保存在服务器上,cookie数据保存在客户端

C、Cookie面向web服务器的发布目录,Session与此无关

D、没有不同


参考答案:B

第9题:

Session和Cookie的区别说法错误的是()。

  • A、Session和Cookie都可以记录数据状态
  • B、在设置Session和Cookie之前不能有输出
  • C、在使用Cookie前要使用cookie_start()函数初始
  • D、Cookie是客户端技术,Session是服务器端技术

正确答案:C

第10题:

下列关于HTTP Cookie说法错误的是()。

  • A、Cookie总是保护存在客户端中
  • B、Session Cookie只是在用户使用站点期间存在,一个WEB浏览器会在退出时删除Session Cookie
  • C、Session Cookie是指Cookie有secure属性,只能通过HTTP使用
  • D、在支持HTTPOnly属性的浏览器中,HTTPOnly Cookie只有在传输HTTP/HTTPS请求时才能被使用,这样可限制被其他的非HTTP API访问(如javaScript)

正确答案:C

更多相关问题