Servlet A receives a request that it forwards to servlet B within another web application in the same webcontainer. Servlet A needs to share data with servlet B and that data must not be visible to other servlets inA’s web application. In which object can the data that A shares with B be stored?()A、HttpSessionB、ServletConfigC、ServletContextD、HttpServletRequestE、HttpServletResponse
Servlet A receives a request that it forwards to servlet B within another web application in the same webcontainer. Servlet A needs to share data with servlet B and that data must not be visible to other servlets inA’s web application. In which object can the data that A shares with B be stored?()
- A、HttpSession
- B、ServletConfig
- C、ServletContext
- D、HttpServletRequest
- E、HttpServletResponse
相关考题:
在J2EE中,对于自己编写的Servlet1,以下对Servlet1的定义正确的是()。 A.classServlet1implementsjavax.servlet.ServletB.classServlet1extendsjavax.servlet.GenericServletC.classServlet1extendsjavax.servlet.http.HttpServletD.classServlet1extendsjavax.servlet.ServletRequest
WhichtwoclassesorinterfacesprovideagetSessionmethod?() A.javax.servlet.http.HttpServletRequestB.javax.servlet.http.HttpSessionContextC.javax.servlet.http.HttpsServletResponseD.javax.servlet.http.HttpSessionBindingEventE.javax.servlet.http.HttpSessionAttributeEvent
Whichinterfacemustaclassimplementtobeinformedofasessioncreationevent?() A.javax.servlet.http.HttpSessionListenerB.javax.servlet.http.HttpSessionBindingListenerC.javax.servlet.http.HttpSessionCreationListenerD.javax.servlet.http.HttpSessionActivationListener
下列哪种情况会导致servlet中的destroy()方法被调用。 A.web应用被终止B.Servlet容器终止运行C.Servlet容器重新装载Servlet新实例D.servlet出现闲置
下列选项描述正确的是()。 A、 在servlet-mapping中的url-patten表示用户请求访问Servlet的URL B、 Servlet容器会根据servlet-class查找到与其对应的servlet-name C、 servlet中的servlet-name内容与servlet-mapping中的servlet-name内容可以不一致 D、 以上描述都不正确
Which two prevent a servlet from handling requests.?()A、 The servlet’s init method returns a non-zero status.B、 The servlet’s init method throws a Servlet ExceptionC、 The servlet’s init method sets the Servlet Response’s context length to 0D、 The servlet’s init method sets the Servlet Response’s content type to null.E、 The servlet’s init method does NOT return within a time period defined by the servlet container.
Which two classes or interfaces provide a getSession method?()A、 javax.servlet.http.HttpServletRequestB、 javax.servlet.http.HttpSessionContextC、 javax.servlet.http.HttpsServletResponseD、 javax.servlet.http.HttpSessionBindingEventE、 javax.servlet.http.HttpSessionAttributeEvent
Which interface must a class implement to be informed of a session creation event?()A、 javax.servlet.http.HttpSessionListenerB、 javax.servlet.http.HttpSessionBindingListenerC、 javax.servlet.http.HttpSessionCreationListenerD、 javax.servlet.http.HttpSessionActivationListener
以下描述JSP与Servlet的关系,正确的有()A、jsp最后会编译成servlet来执行B、MVC中Servlet做C、jsp做VC、Servlet在代码中输出htmlD、JSP和Servlet都是解释执行E、JSP是编译执行,而Servlet是解释执行
在web.xml文件中,描述了一个Servlet,其中()指定了Servlet类的访问路径。A、 servlet中的servlet-name B、url-pattrrn C、 WEB-INF文件夹servlet-class D、 servlet-mapping中的servlet-name
下面关于Servlet生命周期的描述不正确的是()。A、 Servlet实例由Servlet容器负责加载和创建B、 Servlet容器调用init()方法初始化Servlet,每加载一次Servlet都会执行一次init()方法C、 Servlet初始化完毕后,就处于能响应请求的就绪状态D、 Servlet的destroy()方法指明哪些资源可以被系统回收
servlet API由多个包组成,主要包括()。A、javax.servletB、javax.servlet.httpC、javax.servlet.ServletRequestD、javax.servlet.ServletResponse
以下哪些是会话事件的监听API()。A、javax.servlet.ServletContextListenerB、javax.Servlet.servletContextAttributeListenerC、javax.servlet.http.HttpWebSessionListenerD、javax.servlet.http.HttpSessionBindingListener
Servlet的生命周期接口由下列哪个对象定义?()A、javax.servlet.http.HttpServletB、javax.servlet.http.HttpSessionC、javax.servlet.ServletD、javax.servlet.Session
单选题Which interface must a session attribute implement if it needs to be notified when a web container persistsa session?()Ajavax.servlet.http.HttpSessionListenerBjavax.servlet.http.HttpSessionBindingListenerCjavax.servlet.http.HttpSessionAttributeListenerDjavax.servlet.http.HttpSessionActivationListener
单选题下面关于Servlet生命周期的描述不正确的是()。A Servlet实例由Servlet容器负责加载和创建B Servlet容器调用init()方法初始化Servlet,每加载一次Servlet都会执行一次init()方法C Servlet初始化完毕后,就处于能响应请求的就绪状态D Servlet的destroy()方法指明哪些资源可以被系统回收
单选题在web.xml文件中,描述了一个Servlet,其中()指定了Servlet类的访问路径。A servlet中的servlet-name Burl-pattrrn C WEB-INF文件夹servlet-class D servlet-mapping中的servlet-name
多选题在J2EE中,对于自己编写的Servlet1,以下对Servlet1的定义正确的是()。Aclass Servlet1 implements javax.servlet.ServletBclass Servlet1 extends javax.servlet.GenericServletCclass Servlet1 extends javax.servlet.http.HttpServletDclass Servlet1 extends javax.servlet.ServletRequest
单选题Servlet A forwarded a request to servlet B using the forward method of RequestDispatcher. What attributein B’s request object contains the URI of the original request received by servlet A?()AREQUEST_URIBjavax.servlet.forward.request_uriCjavax.servlet.forward.REQUEST_URIDjavax.servlet.request_dispatcher.request_uriEjavax.servlet.request_dispatcher.REQUEST_URI
多选题Which two classes or interfaces provide a getSession method?()Ajavax.servlet.http.HttpServletRequestBjavax.servlet.http.HttpSessionContextCjavax.servlet.http.HttpsServletResponseDjavax.servlet.http.HttpSessionBindingEventEjavax.servlet.http.HttpSessionAttributeEvent
多选题Which two prevent a servlet from handling requests.?()AThe servlet’s init method returns a non-zero status.BThe servlet’s init method throws a Servlet ExceptionCThe servlet’s init method sets the Servlet Response’s context length to 0DThe servlet’s init method sets the Servlet Response’s content type to null.EThe servlet’s init method does NOT return within a time period defined by the servlet container.
单选题下列选项描述正确的是()。A 在servlet-mapping中的url-patten表示用户请求访问Servlet的URL B Servlet容器会根据servlet-class查找到与其对应的servlet-name C servlet中的servlet-name内容与servlet-mapping中的servlet-name内容可以不一致 D 以上描述都不正确
单选题Which interface must a class implement so that instances of the class are notified after any object is addedto a session?()Ajavax.servlet.http.HttpSessionListenerBjavax.servlet.http.HttpSessionValueListenerCjavax.servlet.http.HttpSessionBindingListenerDjavax.servlet.http.HttpSessionAttributeListener
单选题Servlet的生命周期接口由下列哪个对象定义?()Ajavax.servlet.http.HttpServletBjavax.servlet.http.HttpSessionCjavax.servlet.ServletDjavax.servlet.Session
多选题以下哪些是会话事件的监听API()。Ajavax.servlet.ServletContextListenerBjavax.Servlet.servletContextAttributeListenerCjavax.servlet.http.HttpWebSessionListenerDjavax.servlet.http.HttpSessionBindingListener
多选题servlet API由多个包组成,主要包括()。Ajavax.servletBjavax.servlet.httpCjavax.servlet.ServletRequestDjavax.servlet.ServletResponse