HttpServletRequest接口的()方法用于创建会话。A、setSession()B、getContext()C、getSession()D、putSession()

HttpServletRequest接口的()方法用于创建会话。

  • A、setSession()
  • B、getContext()
  • C、getSession()
  • D、putSession()

相关考题:

下列哪个方法用于URL重写() A、HttpServletResponse接口的rewriteURL()方法B、HttpServlet接口的rewriteURL()方法C、HttpServletRequest接口的encodeURL()方法D、HttpServletResponse接口的encodeURL()方法

在J2EE中,对于在Servlet如何获得会话,描述正确的是()。 A.HttpServletRequest类的getSession方法有两个:带参数的getSession方法和不带参数的getSession方法B.在Servlet中,可以使用HttpSessionsession=newHttpSession()创建session对象C.如果HttpServletRequest类的getSession方法的参数为false,表示如果没有与当前的请求相联系的会话对象时,该方法返回nullD.如果HttpServletRequest类的getSession方法的参数为true,表示如果没有与当前的请求相联系的会话对象时,该方法返回null

HttpServletRequest接口的( )方法用于创建会话A、getSession()B、getServletContext()C、setSession();D、putSession();

创建session需要用到()。 A.response.getSession()B.request.setSession()C.response.setSession()D.request.getSession()

获取session属性需要调用方法()。 A.getAttribute()B.setAttribute()C.setSession()D.getSession()

J2EE中,()类型的()方法用于得到会话。 A.HttpServletRequest、getSessionB.HttpServletResponse、newSessionC.HtttpSession、newInstanceD.HttpSession、getSession

在public HttpSession getSession(boolean bool)的方法定义中,当bool为false时表明()A、直接返回会话对象B、当服务器已经创建了会话对象就返回该对象,否则返回nullC、直接返回nullD、当服务器已经创建了会话对象就返回该对象,否则新建一个会话对象并返回

ServletContext接口的()方法用于将对象保存到Servlet上下文中。A、getServetContext()B、getContext()C、getAttribute()D、setAttribute()

J2EE中,哪个类的哪个方法用于创建对话?()A、HttpServletRequest、getSessionB、HttpServletResponse、newSessionC、HtttpSession、newInstanceD、HttpSession、getSession

在Java Web开发中,要在服务器端查询cookie,要用到HttpServletRequest的哪个方法?()A、sessionB、getCookiesC、addCookieD、getSession

Given an HttpServletRequest request: 22.String id = request.getParameter("jsessionid"); 23.// insert code here 24.String name = (String) session.getAttribute("name"); Which three can be placed at line 23 to retrieve anexisting HttpSession object?()A、HttpSession session = request.getSession();B、HttpSession session = request.getSession(id);C、HttpSession session = request.getSession(true);D、HttpSession session = request.getSession(false);E、HttpSession session = request.getSession("jsessionid");

J2EE中,()类的()方法用于创建对话。A、HttpServletRequest;getSessionB、HttpServletRequest;NewSessionC、HttpSession;newInstanceD、HttpSession;getSession

J2EE中,HttpServletRequest类的()方法用返回与当前请求相关联的会话,如果没有,则返回null。A、getSession(null)B、getSession(true)C、getSession(false)

如果要实现监听HTTP会话的创建,需要实现哪个接口的什么方法?()A、HttpSessionListener接口的sessionDestroyed方法B、HttpSessionListener接口的sessionCreated方法C、HttpSessionActivationListener接口的sessionCreated方法D、HttpSessionAttributeListener接口的sessionCreated方法E、HttpSessionBindingListener接口的sessionCreated方法

下面关于HttpServletRequest接口描述错误的是()A、HttpServletRequest接口中最常用的方法就是获得请求的参数B、JSP中的内建对象request是一个HttpServletRequest实例C、HttpServletRequest主要处理读取和写入HTTP头标D、HttpServletRequest主要处理取得路径信息和标识HTTP会话,取得和设置cookiesE、HttpServletRequest主要处理取得输入和输出流

在Java EE中,如果req是HttpServletRequest的实例,要通过req获取已经存在的HttpSession对象,如果不存在就创建一个HttpSession对象,下面选项中()可以实现。A、 req.getSession()B、 req.getSession(false)C、 req.getSession(true)D、 req.createSession()

创建Canvas画布使用的方法是:()A、getContext("3d");B、document.Context("3d");C、getContext("2d");D、document.Context("2d");

Which retrieves all cookies sent in a given HttpSErvletRequest request?()A、 request.getCookies()B、 request.getAttributes()C、 request.getSession ().getCookies()D、 request.getSession (). GetAttributes()

多选题在J2EE中,对于在Servlet如何获得会话,描述正确的是()。AHttpServletRequest类的getSession方法有两个:带参数的getSession方法和不带参数的getSession方法B在Servlet中,可以使用HttpSession session = new HttpSession()创建session对象C如果HttpServletRequest类的getSession方法的参数为false,表示如果没有与当前的请求相联系的会话对象时,该方法返回nullD如果HttpServletRequest类的getSession方法的参数为true,表示如果没有与当前的请求相联系的会话对象时,该方法返回null

单选题J2EE中,哪个类的哪个方法用于创建对话?()AHttpServletRequest、getSessionBHttpServletResponse、newSessionCHtttpSession、newInstanceDHttpSession、getSession

单选题在public HttpSession getSession(boolean bool)的方法定义中,当bool为false时表明()A直接返回会话对象B当服务器已经创建了会话对象就返回该对象,否则返回nullC直接返回nullD当服务器已经创建了会话对象就返回该对象,否则新建一个会话对象并返回

单选题下面关于HttpServletRequest接口描述错误的是()AHttpServletRequest接口中最常用的方法就是获得请求的参数BJSP中的内建对象request是一个HttpServletRequest实例CHttpServletRequest主要处理读取和写入HTTP头标DHttpServletRequest主要处理取得路径信息和标识HTTP会话,取得和设置cookiesEHttpServletRequest主要处理取得输入和输出流

多选题在Java EE中,如果req是HttpServletRequest的实例,要通过req获取已经存在的HttpSession对象,如果不存在就创建一个HttpSession对象,下面选项中()可以实现。Areq.getSession()Breq.getSession(false)Creq.getSession(true)Dreq.createSession()

单选题Which retrieves all cookies sent in a given HttpSErvletRequest request?()A request.getCookies()B request.getAttributes()C request.getSession ().getCookies()D request.getSession (). GetAttributes()

单选题J2EE中,()类的()方法用于创建对话。AHttpServletRequest;getSessionBHttpServletRequest;NewSessionCHttpSession;newInstanceDHttpSession;getSession

单选题如果要实现监听HTTP会话的创建,需要实现哪个接口的什么方法?()AHttpSessionListener接口的sessionDestroyed方法BHttpSessionListener接口的sessionCreated方法CHttpSessionActivationListener接口的sessionCreated方法DHttpSessionAttributeListener接口的sessionCreated方法EHttpSessionBindingListener接口的sessionCreated方法

单选题HttpServletRequest接口的()方法用于创建会话。AsetSession()BgetContext()CgetSession()DputSession()