SCWCD(310-083)

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

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

Proxy

B

View Helper

C

Front Controller

D

Session Facade

E

Business Delegate

F

Model-View-Controller

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

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

第2题:

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

正确答案:A,B,C

第3题:

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

正确答案:D

第4题:

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

第5题:

You are designing a Windows Azure application.  The application includes two web roles and three instances of a worker role.  The web roles will send requests to the worker role through one or more Windows Azure Queues. You have the following requirements:   - Ensure that each request is processed exactly one time.   - Minimize the idle time of each worker role instance. - Maximize the reliability of request processing.   You need to recommend a queue design for sending requests to the worker role.  What should you recommend?()

  • A、 Create a single queue.  Send requests on the single queue.
  • B、 Create a queue for each web role.  Send requests on all queues at the same time.
  • C、 Create a queue for each workerrole instance.  Send requests on each worker queue in a round robin.
  • D、 Create a queue for each combination of web roles and worker role instances.  Send requests to all worker role instances based on the sending web role.

正确答案:A

第6题:

A developer is designing a web application that must verify for each request: The originating request is froma trusted network. The client has a valid session.The client has been authenticated. Which design pattern provides a solution in this situation?()

  • A、Transfer Object
  • B、Session Facade
  • C、Intercepting Filter
  • D、Template Method
  • E、Model-View-Controller

正确答案:C

第7题:

Which is the true choice about the web container request processing model()?

  • A、 The init method on a filter is called the first time a servlet mapped to that filter is invoked
  • B、 A filter defined for a servlet must always forward control to the next resource in the filter chain.
  • C、 Filters associated with a named servlet are applied in the order they appear in the web application deployment descriptor file
  • D、 If the init method on a filter throws an UnavailableException, then the container will make no further attempt to execute it

正确答案:C

第8题:

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、Proxy
  • B、View Helper
  • C、Front Controller
  • D、Session Facade
  • E、Business Delegate
  • F、Model-View-Controller

正确答案:C,F

第9题:

When a system has both online transaction processing as well as large batch processing, which of the following common procedures will best help to improve system performance?()

  • A、 Boost the priority of batch jobs.
  • B、 Schedule batch runs to reduce contention with OLTP.
  • C、 Schedule OS maintenance such that it includes frequent application of PTFs.
  • D、 Perform incremental backups of transaction processing and full backups of batch processing.

正确答案:B

第10题:

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

更多相关问题