单选题A developer has created a special servlet that is responsible for generating XML content that is sent to adata warehousing subsystem. This subsystem uses HTTP to request these large data files, which are compressed by the servlet to save internal netwo

题目
单选题
A developer has created a special servlet that is responsible for generating XML content that is sent to adata warehousing subsystem. This subsystem uses HTTP to request these large data files, which are compressed by the servlet to save internal network bandwidth. The developer has received a request frommanagement to create several more of these data warehousing servlets. The developer is about to copyand paste the compression code into each new servlet. Which design pattern can consolidate thiscompression code to be used by all of the data warehousing servlets?()
A

Facade

B

View Helper

C

Transfer Object

D

Intercepting Filter

E

Composite Facade


相似考题
更多“单选题A developer has created a special servlet that is responsible for generating XML content that is sent to adata warehousing subsystem. This subsystem uses HTTP to request these large data files, which are compressed by the servlet to save internal netwo”相关问题
  • 第1题:

    Given an Http Session session. A Servlet Request request. And a Servlet Context context. Which retrieves a URL to /WEB INF/ my config.xml within a web application?()

    • A、 session.get Resource (“/WEB-INF/myconfig.xml”)
    • B、 request.get Resource (“/WEB-INF/myconfig.xml”)
    • C、 context.get Resource (“/WEB-INF/myconfig.xml”)
    • D、 get Class ().get Resource (“/WEB-INF/myconfig.xml”)

    正确答案:C

  • 第2题:

    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

  • 第3题:

    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

  • 第4题:

    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 in the servlet to the JSP for view generation.This information must NOT be accessible to any other servlet,JSP or session in the webapp. Which two techniques can you use to accomplish this goal?()

    • A、Add attributes to the session object.
    • B、Add attributes on the request object.
    • C、Add parameters to the request object.
    • D、Use the pageContext object to add request attributes.
    • E、Add parameters to the JSP’s URL when generating the request dispatcher.

    正确答案:B,E

  • 第5题:

    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、 HttpSession
    • B、 ServletConfig
    • C、 ServletContext
    • D、 HttpServletRequest
    • E、 HttpServletResponse

    正确答案:D

  • 第6题:

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


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

  • 第7题:

    单选题
    A developer has created a special servlet that is responsible for generating XML content that is sent to adata warehousing subsystem. This subsystem uses HTTP to request these large data files, which are compressed by the servlet to save internal network bandwidth. The developer has received a request frommanagement to create several more of these data warehousing servlets. The developer is about to copyand paste the compression code into each new servlet. Which design pattern can consolidate thiscompression code to be used by all of the data warehousing servlets?()
    A

    Facade

    B

    View Helper

    C

    Transfer Object

    D

    Intercepting Filter

    E

    Composite Facade


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

  • 第8题:

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

  • 第9题:

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


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

  • 第10题:

    单选题
    A customer is experiencing a performance bottleneck in a disk subsystem.  The server is performing sequential I/O with a small number of users requesting large files.  Which of the following would most likely resolve the bottleneck?()
    A

    Increase seek translation

    B

    Increase data transfer rate

    C

    Decrease rotational latency

    D

    Increase rotational latency


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

  • 第11题:

    多选题
    Which two HTTP methods are used to process from data in a servlet? ()
    A

    do GET

    B

    do Put

    C

    do Post

    D

    do Trace

    E

    do Submit

    F

    do Process


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

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

    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.

    正确答案:B

  • 第14题:

    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

  • 第15题:

    A developer has created a special servlet that is responsible for generating XML content that is sent to adata warehousing subsystem. This subsystem uses HTTP to request these large data files, which are compressed by the servlet to save internal network bandwidth. The developer has received a request frommanagement to create several more of these data warehousing servlets. The developer is about to copyand paste the compression code into each new servlet. Which design pattern can consolidate thiscompression code to be used by all of the data warehousing servlets?()

    • A、Facade
    • B、View Helper
    • C、Transfer Object
    • D、Intercepting Filter
    • E、Composite Facade

    正确答案:D

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

    A Company.com developer has created a web application that includes a servlet for each use case in the application. These servlets have become rather difficult to maintain because the request processing methods have become very large. There is also common processing code in many servlets because these use cases are very similar.  Which two design patterns can be used together to refactor and simplify this web application? ()

    • A、 Proxy
    • B、 View Helper
    • C、 Front Controller
    • D、 Session Façade
    • E、 Business Delegate
    • F、 Model-View-Controller

    正确答案:C,F

  • 第18题:

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

    B

    javax.servlet.forward.request_uri

    C

    javax.servlet.forward.REQUEST_URI

    D

    javax.servlet.request_dispatcher.request_uri

    E

    javax.servlet.request_dispatcher.REQUEST_URI


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

  • 第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 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
    解析: 暂无解析

  • 第21题:

    多选题
    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 in the servlet to the JSP for view generation.This information must NOT be accessible to any other servlet,JSP or session in the webapp. Which two techniques can you use to accomplish this goal?()
    A

    Add attributes to the session object.

    B

    Add attributes on the request object.

    C

    Add parameters to the request object.

    D

    Use the pageContext object to add request attributes.

    E

    Add parameters to the JSP’s URL when generating the request dispatcher.


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

  • 第22题:

    单选题
    Given an Http Session session. A Servlet Request request. And a Servlet Context context. Which retrieves a URL to /WEB INF/ my config.xml within a web application?()
    A

     session.get Resource (“/WEB-INF/myconfig.xml”)

    B

     request.get Resource (“/WEB-INF/myconfig.xml”)

    C

     context.get Resource (“/WEB-INF/myconfig.xml”)

    D

     get Class ().get Resource (“/WEB-INF/myconfig.xml”)


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

  • 第23题:

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

     HttpSession

    B

     ServletConfig

    C

     ServletContext

    D

     HttpServletRequest

    E

     HttpServletResponse


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

  • 第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
    解析: 暂无解析