单选题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?()AFacadeBView HelperCTransfer ObjectDIntercepting FilterEComposite 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 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


参考解析

解析: 暂无解析

相关考题:

You work as an application developer at Certkiller .com. You are currently in the process of creating a new application for Certkiller .com. You are required to read compressed data files that has been sent by Certkiller .com‘s sales offices.These data files are less than 4 GB in size, but was compressed without cyclic redundancy. You want to write a method that receives the compressed files and return the uncompressed data as a byte array.What should you do?()A.B.C.D.

当属性scope的值为application时,JSP动作定义的JavaBean实例就会被存储到()对象中。A、Servlet ContextB、Http SessionC、Servlet ApplicationD、Http Servlet Request

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 translationB、Increase data transfer rateC、Decrease rotational latencyD、Increase rotational latency

A 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 havebecome very large. There is also common processing code in many servlets because these use cases arevery similar. Which two design patterns can be used together to refactor and simplify this web application?()A、ProxyB、View HelperC、Front ControllerD、Session FacadeE、Business DelegateF、Model-View-Controller

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”)

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.

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

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

Which two classes or interfaces provide a getSession method?()A、javax.servlet.http.HttpServletRequestB、javax.servlet.http.HttpSessionContextC、javax.servlet.http.HttpServletResponseD、javax.servlet.http.HttpSessionBindingEventE、javax.servlet.http.HttpSessionAttributeEvent

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、FacadeB、View HelperC、Transfer ObjectD、Intercepting FilterE、Composite Facade

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.

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.HttpSessionListenerB、 javax.servlet.http.HttpSessionValueListenerC、 javax.servlet.http.HttpSessionBindingListenerD、 javax.servlet.http.HttpSessionAttributeListener

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

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、 ProxyB、 View HelperC、 Front ControllerD、 Session FaçadeE、 Business DelegateF、 Model-View-Controller

单选题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?()AStore the data in a public instance variable in the servlet.BAdd an attribute to the request object before using the request dispatcher.CAdd an attribute to the context object before using the request dispatcher.DThis CANNOT be done as the tag handler has no means to extract this data.

单选题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 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.HttpSessionListenerB javax.servlet.http.HttpSessionValueListenerC javax.servlet.http.HttpSessionBindingListenerD javax.servlet.http.HttpSessionAttributeListener

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

多选题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 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?()AHttpSessionBServletConfigCServletContextDHttpServletRequestEHttpServletResponse

多选题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?()AAdd attributes to the session object.BAdd attributes on the request object.CAdd parameters to the request object.DUse the pageContext object to add request attributes.EAdd parameters to the JSP’s URL when generating the request dispatcher.

单选题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?()AIncrease seek translationBIncrease data transfer rateCDecrease rotational latencyDIncrease rotational latency

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

多选题Which two HTTP methods are used to process from data in a servlet? ()Ado GETBdo PutCdo PostDdo TraceEdo SubmitFdo Process

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

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