下列()不是request对象的方法。 A: addHeader(Stringname,Stringvalue) B: getSession(Booleancreate) C: setAttribute(Stringname,java.lang.Objecto) D: isSecure()
下列()不是request对象的方法。 A: addHeader(Stringname,Stringvalue) B: getSession(Booleancreate) C: setAttribute(Stringname,java.lang.Objecto) D: isSecure()
下面选项中,当存在Session对象直接返回,否则返回null的方法是 A: request.getSession(); B: request.getSession(true); C: request.getSession(false); D: response.getSession();
下面选项中,当存在Session对象直接返回,否则返回null的方法是 A: request.getSession(); B: request.getSession(true); C: request.getSession(false); D: response.getSession();
J2EE 中,()类型的( )方法用于得到会话 A: HttpServletRequest、getSession B: HttpServletResponse、newSession C: HtttpSession、newInstance D: HttpSession、getSession
J2EE 中,()类型的( )方法用于得到会话 A: HttpServletRequest、getSession B: HttpServletResponse、newSession C: HtttpSession、newInstance D: HttpSession、getSession
给定一个Servlet程序的代码片段如下:Public void doPost(HttpServletRequest request,HttpServletResponse response) throw ServletException,IOException{Request.getSession().getAttribute(“A”); //第2行}假定第2行返回的对象引用不是null,那么这个对象存储在()范围中。 A: page B: application C: request D: session
给定一个Servlet程序的代码片段如下:Public void doPost(HttpServletRequest request,HttpServletResponse response) throw ServletException,IOException{Request.getSession().getAttribute(“A”); //第2行}假定第2行返回的对象引用不是null,那么这个对象存储在()范围中。 A: page B: application C: request D: session
在Java EE中,定义了getSession()方法的接口是()
在Java EE中,定义了getSession()方法的接口是()
创建session需要用到()。 A: response.getSession() B: request.setSession() C: response.setSession() D: request.getSession()
创建session需要用到()。 A: response.getSession() B: request.setSession() C: response.setSession() D: request.getSession()
阅读下面代码: Person 类: public class Person { private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } } Servlet1: request.getSession().setAttribute("name","zhangsan"); Person p = new Person(); p.setName("lisi"); request.getSession().setAttribute("person",p); Servlet2: String name1 = (String)request.getSession().getAttribute("name"); Person p = (Person)request.getSession().getAttribute("person"); response.getWriter().write(name1); if(p!=null)response.getWriter().write(p.getName()); 浏览器先访问Servlet1,再去访问Servlet2,输出的结果是:()
阅读下面代码: Person 类: public class Person { private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } } Servlet1: request.getSession().setAttribute("name","zhangsan"); Person p = new Person(); p.setName("lisi"); request.getSession().setAttribute("person",p); Servlet2: String name1 = (String)request.getSession().getAttribute("name"); Person p = (Person)request.getSession().getAttribute("person"); response.getWriter().write(name1); if(p!=null)response.getWriter().write(p.getName()); 浏览器先访问Servlet1,再去访问Servlet2,输出的结果是:()
获取用户的会话对象session,可以通过response对象的getSession()方法来实现
获取用户的会话对象session,可以通过response对象的getSession()方法来实现
SqlSessionFactory 是通过什么方法生成SqlSession的? A: openSession B: createSession C: buildSession D: getSession
SqlSessionFactory 是通过什么方法生成SqlSession的? A: openSession B: createSession C: buildSession D: getSession
We shall be glad to send you sample-cutting books and pamphlets of our new products______ . A: with request B: as request C: upon request D: at request
We shall be glad to send you sample-cutting books and pamphlets of our new products______ . A: with request B: as request C: upon request D: at request