多选题Given: 11. 12.catalog 13./catalogTemplate.jsp 14.10 15. Which two are true?()ALine 13 is not valid for a servlet declaration.BLine 14 is not valid for a servlet declaration.COne instance of the servlet will be loaded at startup.DTen instances of the se

题目
多选题
Given: 11. 12.catalog 13./catalogTemplate.jsp 14.10 15. Which two are true?()
A

Line 13 is not valid for a servlet declaration.

B

Line 14 is not valid for a servlet declaration.

C

One instance of the servlet will be loaded at startup.

D

Ten instances of the servlet will be loaded at startup.

E

The servlet will be referenced by the name catalog in mappings.


相似考题
更多“多选题Given: 11. 12.catalog 13./catalogTemplate.jsp 14.10 15. Which two are true?()ALine 13 is not valid for a servlet declaration.BLine 14 is not valid for a servlet declaration.COne instance of the servlet will be loaded at startup.DTen instances of the se”相关问题
  • 第1题:

    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

    正确答案:A

  • 第2题:

    Which two classes or interfaces provide a getSession method?()

    • A、javax.servlet.http.HttpServletRequest
    • B、javax.servlet.http.HttpSessionContext
    • C、javax.servlet.http.HttpServletResponse
    • D、javax.servlet.http.HttpSessionBindingEvent
    • E、javax.servlet.http.HttpSessionAttributeEvent

    正确答案:A,D

  • 第3题:

    Given: 11. 12.catalog 13./catalogTemplate.jsp 14.10 15. Which two are true?()

    • A、Line 13 is not valid for a servlet declaration.
    • B、Line 14 is not valid for a servlet declaration.
    • C、One instance of the servlet will be loaded at startup.
    • D、Ten instances of the servlet will be loaded at startup.
    • E、The servlet will be referenced by the name catalog in mappings.

    正确答案:C,E

  • 第4题:

    Which three are true about servlet filters?()

    • A、A filter must implement the destroy method.
    • B、A filter must implement the doFilter method.
    • C、A servlet may have multiple filters associated with it.
    • D、A servlet that is to have a filter applied to it must implement the javax.servlet.FilterChain interface.
    • E、A filter that is part of a filter chain passes control to the next filter in the chain by invoking the FilterChain.forward method.

    正确答案:A,B,C

  • 第5题:

    Which element of the web application deployment descriptor defines the servlet class associated with aservlet instance?()

    • A、<class><br/>
    • B、<webapp><br/>
    • C、<servlet><br/>
    • D、<codebase><br/>
    • E、<servlet-class>

    正确答案:E

  • 第6题:

    多选题
    You want to create a filter for your web application and your filter will implement javax.servlet.Filter. Which two statements are true?()
    A

    Your filter class must implement an init method and a destroy method.

    B

    Your filter class must also implement javax.servlet.FilterChain.

    C

    When your filter chains to the next filter, it should pass the same arguments it received in its doFiltermethod.

    D

    The method that your filter invokes on the object it received that implements javax.servlet.FilterChaincan invoke either another filter or a servlet.

    E

    Your filter class must implement a doFilter method that takes, among other things, anHTTPServletRequest object and an HTTPServletResponse object.


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

  • 第7题:

    单选题
    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
    解析: 暂无解析

  • 第8题:

    多选题
    Which two classes or interfaces provide a getSession method?()
    A

    javax.servlet.http.HttpServletRequest

    B

    javax.servlet.http.HttpSessionContext

    C

    javax.servlet.http.HttpsServletResponse

    D

    javax.servlet.http.HttpSessionBindingEvent

    E

    javax.servlet.http.HttpSessionAttributeEvent


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

  • 第9题:

    单选题
    Given the HttpServlet code:   getServletContext().setAttribute(“foo”, “value”); What is the result?()
    A

     The attribute foo is placed in the application

    B

     A ServletContextListener registered for that servlet is notified

    C

     A ServletAttributeListener registered for that servlet is notified

    D

     An HttpSessionAttributeListener registered for that servlet is notified


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

  • 第10题:

    多选题
    11. public interface Status {  12. /* insert code here */ int MY_VALUE = 10;  13. }  Which three are valid on line 12?()
    A

    final

    B

    static

    C

    native

    D

    public

    E

    private

    F

    abstract

    G

    protected


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

  • 第11题:

    多选题
    10. class Foo {  11. static void alpha() { /* more code here */ }  12. void beta() { /* more code here */ }  13. }  Which two are true?()
    A

    Foo.beta() is a valid invocation of beta().

    B

    Foo.alpha() is a valid invocation of alpha().

    C

    Method beta() can directly call method alpha().

    D

    Method alpha() can directly call method beta().


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

  • 第12题:

    单选题
    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
    解析: 暂无解析

  • 第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题:

    Which three are valid URL mappings to a servlet in a web deployment descriptor?()

    • A、*/*
    • B、*.do
    • C、MyServlet
    • D、/MyServlet
    • E、/MyServlet/*
    • F、MyServlet/*.jsp

    正确答案:B,D,E

  • 第15题:

    Given the HttpServlet code:   getServletContext().setAttribute(“foo”, “value”); What is the result?()

    • A、 The attribute foo is placed in the application
    • B、 A ServletContextListener registered for that servlet is notified
    • C、 A ServletAttributeListener registered for that servlet is notified
    • D、 An HttpSessionAttributeListener registered for that servlet is notified

    正确答案:A

  • 第16题:

    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

  • 第17题:

    多选题
    Which three are true about servlet filters?()
    A

    A filter must implement the destroy method.

    B

    A filter must implement the doFilter method.

    C

    A servlet may have multiple filters associated with it.

    D

    A servlet that is to have a filter applied to it must implement the javax.servlet.FilterChain interface.

    E

    A filter that is part of a filter chain passes control to the next filter in the chain by invoking the FilterChain.forward method.


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

  • 第18题:

    多选题
    Given: 11. 12.catalog 13./catalogTemplate.jsp 14.10 15. Which two are true?()
    A

    Line 13 is not valid for a servlet declaration.

    B

    Line 14 is not valid for a servlet declaration.

    C

    One instance of the servlet will be loaded at startup.

    D

    Ten instances of the servlet will be loaded at startup.

    E

    The servlet will be referenced by the name catalog in mappings.


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

  • 第19题:

    多选题
    Given 11.public interface Status { 12./* insert code here */ int MY_VALUE = 10; 13.} Which three are valid on line 12?()
    A

    final

    B

    static

    C

    native

    D

    public

    E

    private


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

  • 第20题:

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

    C

    The servlet’s init method sets the Servlet Response’s context length to 0

    D

    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.


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

  • 第21题:

    多选题
    Which the three are true about servlet filters?()
    A

    A filter must implement the destroy method

    B

    A filter must implement the doFilter method

    C

    A servlet may have multiple filters associated with it

    D

    A servlet that is to have a filter applied to it must implement the javax.servlet.FilterChain  interface

    E

    A filter that is part of a filter chain passes control to the next filter in the chain by invoking the filterChain forward method

    F

    For each  element in the web application deployment descriptor, multiple instances of a filter may be created by the web container


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

  • 第22题:

    多选题
    Which thethree are valid URL mappings to a servlet in a web deployment descriptor? ()
    A

    */*

    B

    /*.do

    C

    myServlet

    D

    /Myservlet

    E

    /MyServlet/*

    F

    MyServlet/*.isp


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

  • 第23题:

    单选题
    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
    解析: 暂无解析