以下哪段代码能从请求对象中获取名为"ORA-UID"的Cookie的值? ( )
A. String value = request. getCookie("ORA-UID");
B. String value = request.getHeader("ORA-UID");
Cookie[] cookies = request.getCookies();String cName= null;String value = null;if( cookies !=null){for(int i = 0 ;i D. Cookie[] cookies = request.getCookies();if(cookies. length>0){String value = cookies[0].getValue();}
查看答案
假定request是一个 HttpServletRequest对象,下面哪两行代码会在不存在会话的情况下创建一个会话?()
A. request.getSession()
B. request.getSession(true)
C. request. getSession(false)
D. request. createSession()
关于HttpSession对象,下面哪两个说法是正确的?( )
A. ,会话的超时时间设置为-1,则会话永远不会到期
B. 一旦用户关闭所有浏览器窗口,会话就会立即失效
C. 在部署描述文件中定义的超时时间之后,会话会失效
D. 可以调用HttpSession的invalidateSession()使会话失效
下列四种意象,哪一项代表的情感与其他几项不同?( )
A. 明月
B. 枫叶
C. 荻花
D. 黄芦
Today, according to UNICEF, at least __1___ billion people lack adequate sanitation, while 1.1 billion people live without clean drinking water period. Water is the key __ 2___ in all of our daily lives no matter where we live, not only for human use, but for energy, industry, agriculture, and __3___. Now if you look at the earth, you’ll notice that over __4__ of our blue planet is water. The problem is only 3% of that water is __5__ water.