网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
设置session的有效时间使用的是该对象的什么方法?()
- A、setAttribute()方法
- B、getMaxInactiveInterval()方法
- C、setMaxInactiveInterval()方法
- D、setTime()方法
参考答案
更多 “设置session的有效时间使用的是该对象的什么方法?()A、setAttribute()方法B、getMaxInactiveInterval()方法C、setMaxInactiveInterval()方法D、setTime()方法” 相关考题
考题
在J2EE中,在web.xml中,有如下代码:session-configsession-timeout30/session-timeout/session-config以下描述正确的是()。
A.顶一了,默认的会话超时时长、时间为30秒。B.可以使用HttpSession类的getMaxInactiveInterval()方法把该值提取出来C.定义了默认的会话超时时长。时长为30小时D.可以使用Session类的getMaxInactiveInterval()方法把该值取出来
考题
以下方法,哪个可使session无效?( )A.session.removeAttribute(String key)B.session.invalidate()C.session.setAttribute(String key)D.session.getAttribute(String key)
考题
下面哪项不是session对象的方法()A、getAttribute(Stringname)B、invalidate()C、getServletInfo()D、setAttribute(Stringname,Objectvalue)
考题
从HTTP请求中,获得请求参数,应该调用()
A.request对象的getAttribute()方法B.request对象的getParameter()方法C.session对象的getAttribute()方法D.session对象的getParameter()方法
考题
从HTTP请求中,获得请求参数,应该调用()A、request对象的getAttribute()方法B、request对象的getParameter()方法C、session对象的getAttribute()方法D、session对象的getParameter()方法
考题
Hibernate对象从瞬时(即临时状态)到持久状态转换的方式有()A、调用session的save方法B、调用session的create方法C、调用session的update方法D、调用session的load方法
考题
Hibernate对象从瞬时到持久状态转换的方式有()。A、调用session的save方法B、调用session的create方法C、调用session的update方法D、调用session的load方法
考题
Hibernate对象从临时状态到持久状态转换的方式有?()A、调用session的save方法B、调用session的close方法C、调用session的clear方法D、调用session的evict方法
考题
在J2EE中,对于在Servlet如何获得会话,描述正确的是()。 A、HttpServletRequest类的getSession方法有两个:带参数的getSession方法和不带参数的getSession方法B、在Servlet中,可以使用HttpSession session = new HttpSession()创建session对象C、如果HttpServletRequest类的getSession方法的参数为false,表示如果没有与当前的请求相联系的会话对象时,该方法返回nullD、如果HttpServletRequest类的getSession方法的参数为true,表示如果没有与当前的请求相联系的会话对象时,该方法返回null
考题
在J2EE中,在web.xml中,有如下代码: 30 /session-config 以下描述正确的是()。 A、顶一了,默认的会话超时时长、时间为30秒。B、可以使用HttpSession类的getMaxInactiveInterval()方法把该值提取出来C、定义了默认的会话超时时长。时长为30小时D、可以使用Session类的getMaxInactiveInterval()方法把该值取出来
考题
设置session的有效时间(也叫超时时间)的方法是()。A、setMaxinactivelnterval(intinterval)B、getAttributeName()C、setAttrlbuteName(Strlngname,java.lang.Objectvalue)D、getLastAccessedTime()
考题
下面哪个方法可使session无效() A、session.setAttribute()B、session.getAttribute()C、session.invalidate()D、session.removeAttribute()
考题
ession对象的()方法用于设置会话的超时时间。A、session.setAttribute(“time”,30);B、session.setMaxTime(30);C、session.getMaxInactiveInterval();D、session.setMaxInactiveInterval(30);
考题
MySession引用某HttpSession对象。当调用mySession.setAttribute时,一个HttpSessionBindingEvent对象将发往()。A、HttpSessionListener的attributeAdded方法B、ServletContextListener的attributeAdded方法C、HttpSessionAttributeListener的attributeAdded方法D、HttpSessionBindingListener的attributeAdded方法
考题
单选题设置session的有效时间使用的是该对象的什么方法?()A
setAttribute()方法B
getMaxInactiveInterval()方法C
setMaxInactiveInterval()方法D
setTime()方法
考题
多选题Hibernate对象从瞬时(即临时状态)到持久状态转换的方式有()A调用session的save方法B调用session的create方法C调用session的update方法D调用session的load方法
考题
单选题在J2EE中,在web.xml中,有如下代码: 30 以下描述正确的是()。A
顶一了,默认的会话超时时长、时间为30秒。B
可以使用HttpSession类的getMaxInactiveInterval()方法把该值提取出来C
定义了默认的会话超时时长。时长为30小时D
可以使用Session类的getMaxInactiveInterval()方法把该值取出来
考题
单选题ession对象的()方法用于设置会话的超时时间。A
session.setAttribute(“time”,30);B
session.setMaxTime(30);C
session.getMaxInactiveInterval();D
session.setMaxInactiveInterval(30);
考题
单选题MySession引用某HttpSession对象。当调用mySession.setAttribute时,一个HttpSessionBindingEvent对象将发往()。A
HttpSessionListener的attributeAdded方法B
ServletContextListener的attributeAdded方法C
HttpSessionAttributeListener的attributeAdded方法D
HttpSessionBindingListener的attributeAdded方法
考题
单选题Hibernate对象从临时状态到持久状态转换的方式有?()A
调用session的save方法B
调用session的close方法C
调用session的clear方法D
调用session的evict方法
热门标签
最新试卷