单选题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.HttpSessionAttributeListe

题目
单选题
Which interface must a session attribute implement if it needs to be notified when a web container persistsa session?()
A

javax.servlet.http.HttpSessionListener

B

javax.servlet.http.HttpSessionBindingListener

C

javax.servlet.http.HttpSessionAttributeListener

D

javax.servlet.http.HttpSessionActivationListener


相似考题

2. Your web application requires the adding and deleting of many session attributes during a complex usecase. A bug report has come in that indicates that an important session attribute is being deleted too soonand a NullPointerException is being thrown several interactions after the fact. You have decided to create asession event listener that will log when attributes are being deleted so you can track down when theattribute is erroneously being deleted. Which listener class will accomplish this debugging goal?()A、Create an HttpSessionAttributeListener class and implement the attributeDeleted method and log the attribute name using the getName method on the event object.B、Create an HttpSessionAttributeListener class and implement the attributeRemoved method and log the attribute name using the getName method on the event object.C、Create an SessionAttributeListener class and implement the attributeRemoved method and log the attribute name using the getAttributeName method on the event object.D、Create an SessionAttributeListener class and implement the attributeDeleted method and log the attribute name using the getAttributeName method on the event object.

更多“单选题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.HttpSessionAttributeListe”相关问题
  • 第1题:

    Which three are described in the standard web application deployment descriptor?()  

    • A、 session configuration
    • B、 MIME type mappings
    • C、 context root for the application
    • D、 servlet instance pool configuration
    • E、 web container default port bindings
    • F、 ServletContext initialization parameters

    正确答案:A,B,F

  • 第2题:

    Which interface must a session attribute implement if it needs to be notified when a web container persistsa session?()

    • A、javax.servlet.http.HttpSessionListener
    • B、javax.servlet.http.HttpSessionBindingListener
    • C、javax.servlet.http.HttpSessionAttributeListener
    • D、javax.servlet.http.HttpSessionActivationListener

    正确答案:D

  • 第3题:

    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.

    正确答案:A

  • 第4题:

    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.

    正确答案:C

  • 第5题:

    Which interface must a class implement so that instances of the class are notified after any object is added to a session? ()

    • A、 javax.servlet.http.HttpSessionListener
    • B、 javax.servlet.http.HttpSessionValueListener
    • C、 javax.servlet.http.HttpSessionBindingListener
    • D、 javax.servlet.http.HttpSessionAttributeListener

    正确答案:C

  • 第6题:

    End users want to map a network drive on their PCs when they are connected to the Junos Pulse Access Control Service. The mapped drive must be removed when users disconnect their session.Which feature addresses this requirement?()

    • A、agent session scripts
    • B、preconfiguration installer
    • C、Junos Pulse component set
    • D、agent actions

    正确答案:A

  • 第7题:

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


    正确答案: D,B
    解析: 暂无解析

  • 第8题:

    多选题
    Select 3 AVPs (Attribute-Value Pair) which MUST be present in the ICRQ:()
    A

    Message Type

    B

    Calling Number

    C

    Assigned Session ID

    D

    Called Number

    E

    Call Serial Number


    正确答案: E,D
    解析: 暂无解析

  • 第9题:

    单选题
    Which interface must a class implement to be informed of a session creation event?()
    A

     javax.servlet.http.HttpSessionListener

    B

     javax.servlet.http.HttpSessionBindingListener

    C

     javax.servlet.http.HttpSessionCreationListener

    D

     javax.servlet.http.HttpSessionActivationListener


    正确答案: D
    解析: 暂无解析

  • 第10题:

    多选题
    For which three events can web application event listeners be registered? ()
    A

    when a session is created

    B

    after a servlet is destroyed

    C

    when a session has timed out

    D

    when a cookie has been created

    E

    when a servlet has forwarded a request

    F

    when a session attribute value is changed


    正确答案: C,D
    解析: 暂无解析

  • 第11题:

    单选题
    End users want to map a network drive on their PCs when they are connected to the Junos Pulse Access Control Service. The mapped drive must be removed when users disconnect their session.Which feature addresses this requirement?()
    A

    agent session scripts

    B

    preconfiguration installer

    C

    Junos Pulse component set

    D

    agent actions


    正确答案: A
    解析: 暂无解析

  • 第12题:

    单选题
    Which interface must a session attribute implement if it needs to be notified when a web container persistsa session?()
    A

    javax.servlet.http.HttpSessionListener

    B

    javax.servlet.http.HttpSessionBindingListener

    C

    javax.servlet.http.HttpSessionAttributeListener

    D

    javax.servlet.http.HttpSessionActivationListener


    正确答案: C
    解析: 暂无解析

  • 第13题:

    Which three are described in the standard web application deployment descriptor?()

    • A、session configuration
    • B、MIME type mappings
    • C、context root for the application
    • D、servlet instance pool configuration
    • E、web container default port bindings
    • F、Servlet Context initialization parameters

    正确答案:A,B,F

  • 第14题:

    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,D,E

  • 第15题:

    For which three events can web application event listeners be registered?()

    • A、When a session is created
    • B、After a servlet is destroyed
    • C、When a session has timed out
    • D、When a cookie has been created
    • E、When a servlet has forwarded a request
    • F、When a session attribute value is changed

    正确答案:A,C,F

  • 第16题:

    Which the 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.

    正确答案:C

  • 第17题:

    You are customizing the user interface options for the finance department in your organization. Users in the department are able to see a session counter on the Web interface of the Junos Pulse Access Control Service. The CFO is unable to see the session counter.Which explanation would cause this behavior?()

    • A、The CFO is mapped to the finance role, but the session counter was enabled prior to the role mapping.
    • B、The CFO is mapped to the finance role, but the session counter was enabled after the role mapping.
    • C、The CFO is mapped to the executive and finance roles, but the CFO was mapped to the executive role first, which does not have the session counter enabled.
    • D、The CFO is mapped to the executive and finance roles, but the CFO was mapped to the executive role last, which does not have the session counter enabled.

    正确答案:C

  • 第18题:

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


    正确答案: B
    解析: 暂无解析

  • 第19题:

    单选题
    Which interface must a class implement so that instances of the class are notified after any object is added to a session? ()
    A

     javax.servlet.http.HttpSessionListener

    B

     javax.servlet.http.HttpSessionValueListener

    C

     javax.servlet.http.HttpSessionBindingListener

    D

     javax.servlet.http.HttpSessionAttributeListener


    正确答案: B
    解析: 暂无解析

  • 第20题:

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


    正确答案: B
    解析: 暂无解析

  • 第21题:

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


    正确答案: C
    解析: 暂无解析

  • 第22题:

    单选题
    You are customizing the user interface options for the finance department in your organization. Users in the department are able to see a session counter on the Web interface of the Junos Pulse Access Control Service. The CFO is unable to see the session counter.Which explanation would cause this behavior?()
    A

    The CFO is mapped to the finance role, but the session counter was enabled prior to the role mapping.

    B

    The CFO is mapped to the finance role, but the session counter was enabled after the role mapping.

    C

    The CFO is mapped to the executive and finance roles, but the CFO was mapped to the executive role first, which does not have the session counter enabled.

    D

    The CFO is mapped to the executive and finance roles, but the CFO was mapped to the executive role last, which does not have the session counter enabled.


    正确答案: B
    解析: 暂无解析

  • 第23题:

    单选题
    Your web application requires the adding and deleting of many session attributes during a complex usecase. A bug report has come in that indicates that an important session attribute is being deleted too soonand a NullPointerException is being thrown several interactions after the fact. You have decided to create asession event listener that will log when attributes are being deleted so you can track down when theattribute is erroneously being deleted. Which listener class will accomplish this debugging goal?()
    A

    Create an HttpSessionAttributeListener class and implement the attributeDeleted method and log the attribute name using the getName method on the event object.

    B

    Create an HttpSessionAttributeListener class and implement the attributeRemoved method and log the attribute name using the getName method on the event object.

    C

    Create an SessionAttributeListener class and implement the attributeRemoved method and log the attribute name using the getAttributeName method on the event object.

    D

    Create an SessionAttributeListener class and implement the attributeDeleted method and log the attribute name using the getAttributeName method on the event object.


    正确答案: A
    解析: 暂无解析

  • 第24题:

    单选题
    Which interface must a class implement so that instances of the class are notified after any object is addedto a session?()
    A

    javax.servlet.http.HttpSessionListener

    B

    javax.servlet.http.HttpSessionValueListener

    C

    javax.servlet.http.HttpSessionBindingListener

    D

    javax.servlet.http.HttpSessionAttributeListener


    正确答案: B
    解析: 暂无解析