网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
多选题
A session-scoped attribute is stored by a servlet, and then that servlet forwards to a JSP page. Which threejsp:useBean attributes must be used to access this attribute in the JSP page?()
A

id

B

name

C

bean

D

type

E

scope


参考答案

参考解析
解析: 暂无解析
更多 “多选题A session-scoped attribute is stored by a servlet, and then that servlet forwards to a JSP page. Which threejsp:useBean attributes must be used to access this attribute in the JSP page?()AidBnameCbeanDtypeEscope” 相关考题
考题 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

考题 Which statement is true about web container session management?()A、Access to session-scoped attributes is guaranteed to be thread-safe by the web container.B、To activate URL rewriting, the developer must use the HttpServletResponse.setURLRewriting method.C、If the web application uses HTTPS, then the web container may use the data on the HTTPS request stream to identify the client.D、The JSESSIONID cookie is stored permanently on the client so that a user may return to the web application and the web container will rejoin that session.

考题 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.

考题 Upon a user’s first visit to the website, which two operations are always performed when the getSession method is called with no arguments in a servlet?()A、 All URLs returned by the server are rewritten.B、 An HttpSession object is created if necessary.C、 The user name and password of the user are checked.D、 The session ID is stored in the HTTP response as a cookie.

考题 Which interface must a session attribute implement if it needs to be notified when a web container persistsa session?()A、javax.servlet.http.HttpSessionListenerB、javax.servlet.http.HttpSessionBindingListenerC、javax.servlet.http.HttpSessionAttributeListenerD、javax.servlet.http.HttpSessionActivationListener

考题 A session-scoped attribute is stored by a servlet, and then that servlet forwards to a JSP page. Which threejsp:useBean attributes must be used to access this attribute in the JSP page?()A、idB、nameC、beanD、typeE、scope

考题 You have a use case in your web application that adds several session-scoped attributes. At the end of theuse case, one of these objects, the manager attribute, is removed and then it needs to decide which of theother session-scoped attributes to remove. How can this goal be accomplished?()A、The object of the manager attribute should implement the HttpSessionBindingListener and it should call the removeAttribute method on the appropriate session attributes.B、The object of the manager attribute should implement the HttpSessionListener and it should call the removeAttribute method on the appropriate session attributes.C、The object of the manager attribute should implement the HttpSessionBindingListener and it should call the deleteAttribute method on the appropriate session attributes.D、The object of the manager attribute should implement the HttpSessionListener and it should call the deleteAttribute method on the appropriate session attributes.

考题 For which three events can web application event listeners be registered?()A、When a session is createdB、After a servlet is destroyedC、When a session has timed outD、When a cookie has been createdE、When a servlet has forwarded a requestF、When a session attribute value is changed

考题 Given the HttpServlet code:   getServletContext().setAttribute(“foo”, “value”); What is the result?()A、 The attribute foo is placed in the applicationB、 A ServletContextListener registered for that servlet is notifiedC、 A ServletAttributeListener registered for that servlet is notifiedD、 An HttpSessionAttributeListener registered for that servlet is notified

考题 Given that session is a valid HttpSession object:   Int max = session.getAttribute(“MyReallyLongName”);   Which is true?()  A、 The value returned needs to be cast to an int.B、 The getAttribute methos takes two arguments.C、 Primitive CANNOT be stored in the HttpSession.D、 The HttpSession attribute name must NOT exceed eight characters.

考题 单选题Which interface must a session attribute implement if it needs to be notified when a web container persistsa session?()A javax.servlet.http.HttpSessionListenerB javax.servlet.http.HttpSessionBindingListenerC javax.servlet.http.HttpSessionAttributeListenerD javax.servlet.http.HttpSessionActivationListener

考题 单选题A session-scoped attribute, product, is stored by a servlet. That servlet then forwards to a JSP page. This attribute holds an instance of the com.Company.   Product class with a name property of “The Matrix” and price property of 39.95. Given the JSP page code snippet: What is the response output of this JSP page code snippet? ()A  Default costs 0.0B  Default costs 49.95C  Default costs 39.95D  The Matrix costs 0.0E  The Matrix costs 49.95F  The Matrix costs 39.95

考题 单选题Given that session is a valid HttpSession object:   Int max = session.getAttribute(“MyReallyLongName”);   Which is true?()A  The value returned needs to be cast to an int.B  The getAttribute methos takes two arguments.C  Primitive CANNOT be stored in the HttpSession.D  The HttpSession attribute name must NOT exceed eight characters.

考题 单选题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

考题 单选题You have a use case in your web application that adds several session-scoped attributes. At the end of theuse case, one of these objects, the manager attribute, is removed and then it needs to decide which of theother session-scoped attributes to remove. How can this goal be accomplished?()A The object of the manager attribute should implement the HttpSessionBindingListener and it should call the removeAttribute method on the appropriate session attributes.B The object of the manager attribute should implement the HttpSessionListener and it should call the removeAttribute method on the appropriate session attributes.C The object of the manager attribute should implement the HttpSessionBindingListener and it should call the deleteAttribute method on the appropriate session attributes.D The object of the manager attribute should implement the HttpSessionListener and it should call the deleteAttribute method on the appropriate session attributes.

考题 多选题在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?()A REQUEST_URIB javax.servlet.forward.request_uriC javax.servlet.forward.REQUEST_URID javax.servlet.request_dispatcher.request_uriE javax.servlet.request_dispatcher.REQUEST_URI

考题 单选题Which statement is true about web container session management?()A Access to session-scoped attributes is guaranteed to be thread-safe by the web container.B To activate URL rewriting, the developer must use the HttpServletResponse.setURLRewriting method.C If the web application uses HTTPS, then the web container may use the data on the HTTPS request stream to identify the client.D The JSESSIONID cookie is stored permanently on the client so that a user may return to the web application and the web container will rejoin that session.

考题 多选题For which three events can web application event listeners be registered? ()Awhen a session is createdBafter a servlet is destroyedCwhen a session has timed outDwhen a cookie has been createdEwhen a servlet has forwarded a requestFwhen a session attribute value is changed

考题 多选题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

考题 单选题Servlet A receives a request that it forwards to servlet B within another web application in the same web container. Servlet A needs to share data with servlet B and that data must not be visible to other servlets in A’s web application.  In which object can the data that A shares with B be stored?()A  HttpSessionB  ServletConfigC  ServletContextD  HttpServletRequestE  HttpServletResponse

考题 多选题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.

考题 单选题Given the HttpServlet code:   getServletContext().setAttribute(“foo”, “value”); What is the result?()A  The attribute foo is placed in the applicationB  A ServletContextListener registered for that servlet is notifiedC  A ServletAttributeListener registered for that servlet is notifiedD  An HttpSessionAttributeListener registered for that servlet is notified

考题 多选题Upon a user’s first visit to the website, which two operations are always performed when the getSession method is called with no arguments in a servlet?()AAll URLs returned by the server are rewritten.BAn HttpSession object is created if necessary.CThe user name and password of the user are checked.DThe session ID is stored in the HTTP response as a cookie.

考题 单选题Your web application uses a simple architecture in which servlets handle requests and then forward to aJSP using a request dispatcher. You need to pass information calculated by the servlet to the JSP;furthermore, that JSP uses a custom tag and must also process this information. This information mustNOT be accessible to any other servlet, JSP or session in the webapp. How can you accomplish this goal?()A Store the data in a public instance variable in the servlet.B Add an attribute to the request object before using the request dispatcher.C Add an attribute to the context object before using the request dispatcher.D This CANNOT be done as the tag handler has no means to extract this data.

考题 单选题Servlet的生命周期接口由下列哪个对象定义?()A javax.servlet.http.HttpServletB javax.servlet.http.HttpSessionC javax.servlet.ServletD javax.servlet.Session